Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

34.6 KB
Raw Blame
// <auto-generated />
using System;
using System.Collections.Generic;
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.Sqlite.Storage.Internal;
using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.EntityFrameworkCore.Storage.Json;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal;

#pragma warning disable 219, 612, 618
#nullable disable

namespace Aetheris.Kernel.StandardLibrary.Materials.Database.CompiledModel
{
    [EntityFrameworkInternal]
    public partial class MaterialEntityEntityType
    {
        public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType baseEntityType = null)
        {
            var runtimeEntityType = model.AddEntityType(
                "Aetheris.Kernel.StandardLibrary.Materials.Database.MaterialEntity",
                typeof(MaterialEntity),
                baseEntityType,
                propertyCount: 12,
                navigationCount: 1,
                unnamedIndexCount: 2,
                keyCount: 1);

            var id = runtimeEntityType.AddProperty(
                "Id",
                typeof(int),
                propertyInfo: typeof(MaterialEntity).GetProperty("Id", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly),
                fieldInfo: typeof(MaterialEntity).GetField("<Id>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly),
                valueGenerated: ValueGenerated.OnAdd,
                afterSaveBehavior: PropertySaveBehavior.Throw,
                sentinel: 0);
            id.SetGetter(
                int (MaterialEntity instance) => MaterialEntityUnsafeAccessors.Id(instance),
                bool (MaterialEntity instance) => MaterialEntityUnsafeAccessors.Id(instance) == 0);
            id.SetSetter(
                MaterialEntity (MaterialEntity instance, int value) =>
                {
                    MaterialEntityUnsafeAccessors.Id(instance) = value;
                    return instance;
                });
            id.SetMaterializationSetter(
                MaterialEntity (MaterialEntity instance, int value) =>
                {
                    MaterialEntityUnsafeAccessors.Id(instance) = value;
                    return instance;
                });
            id.SetAccessors(
                int (IInternalEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : (entry.FlaggedAsTemporary(0) && MaterialEntityUnsafeAccessors.Id(((MaterialEntity)(entry.Entity))) == 0 ? entry.ReadTemporaryValue<int>(0) : MaterialEntityUnsafeAccessors.Id(((MaterialEntity)(entry.Entity))))),
                int (IInternalEntry entry) => MaterialEntityUnsafeAccessors.Id(((MaterialEntity)(entry.Entity))),
                int (IInternalEntry entry) => entry.ReadOriginalValue<int>(id, 0),
                int (IInternalEntry entry) => ((InternalEntityEntry)(entry)).ReadRelationshipSnapshotValue<int>(id, 0));
            id.SetPropertyIndexes(
                index: 0,
                originalValueIndex: 0,
                shadowIndex: -1,
                relationshipIndex: 0,
                storeGenerationIndex: 0);
            id.TypeMapping = IntTypeMapping.Default.Clone(
                comparer: new ValueComparer<int>(
                    bool (int v1, int v2) => v1 == v2,
                    int (int v) => v,
                    int (int v) => v),
                keyComparer: new ValueComparer<int>(
                    bool (int v1, int v2) => v1 == v2,
                    int (int v) => v,
                    int (int v) => v),
                providerValueComparer: new ValueComparer<int>(
                    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));

            var catalogId = runtimeEntityType.AddProperty(
                "CatalogId",
                typeof(string),
                propertyInfo: typeof(MaterialEntity).GetProperty("CatalogId", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly),
                fieldInfo: typeof(MaterialEntity).GetField("<CatalogId>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly));
            catalogId.SetGetter(
                string (MaterialEntity instance) => MaterialEntityUnsafeAccessors.CatalogId(instance),
                bool (MaterialEntity instance) => MaterialEntityUnsafeAccessors.CatalogId(instance) == null);
            catalogId.SetSetter(
                MaterialEntity (MaterialEntity instance, string value) =>
                {
                    MaterialEntityUnsafeAccessors.CatalogId(instance) = value;
                    return instance;
                });
            catalogId.SetMaterializationSetter(
                MaterialEntity (MaterialEntity instance, string value) =>
                {
                    MaterialEntityUnsafeAccessors.CatalogId(instance) = value;
                    return instance;
                });
            catalogId.SetAccessors(
                string (IInternalEntry entry) => MaterialEntityUnsafeAccessors.CatalogId(((MaterialEntity)(entry.Entity))),
                string (IInternalEntry entry) => MaterialEntityUnsafeAccessors.CatalogId(((MaterialEntity)(entry.Entity))),
                string (IInternalEntry entry) => entry.ReadOriginalValue<string>(catalogId, 1),
                string (IInternalEntry entry) => entry.GetCurrentValue<string>(catalogId));
            catalogId.SetPropertyIndexes(
                index: 1,
                originalValueIndex: 1,
                shadowIndex: -1,
                relationshipIndex: -1,
                storeGenerationIndex: -1);
            catalogId.TypeMapping = SqliteStringTypeMapping.Default;
            catalogId.SetCurrentValueComparer(new EntryCurrentValueComparer<string>(catalogId));

            var constitutiveClass = runtimeEntityType.AddProperty(
                "ConstitutiveClass",
                typeof(MaterialConstitutiveClass),
                propertyInfo: typeof(MaterialEntity).GetProperty("ConstitutiveClass", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly),
                fieldInfo: typeof(MaterialEntity).GetField("<ConstitutiveClass>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly),
                providerPropertyType: typeof(string));
            constitutiveClass.SetGetter(
                MaterialConstitutiveClass (MaterialEntity instance) => MaterialEntityUnsafeAccessors.ConstitutiveClass(instance),
                bool (MaterialEntity instance) => object.Equals(((object)(MaterialEntityUnsafeAccessors.ConstitutiveClass(instance))), ((object)(MaterialConstitutiveClass.LinearElasticIsotropic))));
            constitutiveClass.SetSetter(
                MaterialEntity (MaterialEntity instance, MaterialConstitutiveClass value) =>
                {
                    MaterialEntityUnsafeAccessors.ConstitutiveClass(instance) = value;
                    return instance;
                });
            constitutiveClass.SetMaterializationSetter(
                MaterialEntity (MaterialEntity instance, MaterialConstitutiveClass value) =>
                {
                    MaterialEntityUnsafeAccessors.ConstitutiveClass(instance) = value;
                    return instance;
                });
            constitutiveClass.SetAccessors(
                MaterialConstitutiveClass (IInternalEntry entry) => MaterialEntityUnsafeAccessors.ConstitutiveClass(((MaterialEntity)(entry.Entity))),
                MaterialConstitutiveClass (IInternalEntry entry) => MaterialEntityUnsafeAccessors.ConstitutiveClass(((MaterialEntity)(entry.Entity))),
                MaterialConstitutiveClass (IInternalEntry entry) => entry.ReadOriginalValue<MaterialConstitutiveClass>(constitutiveClass, 2),
                MaterialConstitutiveClass (IInternalEntry entry) => entry.GetCurrentValue<MaterialConstitutiveClass>(constitutiveClass));
            constitutiveClass.SetPropertyIndexes(
                index: 2,
                originalValueIndex: 2,
                shadowIndex: -1,
                relationshipIndex: -1,
                storeGenerationIndex: -1);
            constitutiveClass.TypeMapping = SqliteStringTypeMapping.Default.Clone(
                comparer: new ValueComparer<MaterialConstitutiveClass>(
                    bool (MaterialConstitutiveClass v1, MaterialConstitutiveClass v2) => object.Equals(((object)(v1)), ((object)(v2))),
                    int (MaterialConstitutiveClass v) => ((object)v).GetHashCode(),
                    MaterialConstitutiveClass (MaterialConstitutiveClass v) => v),
                keyComparer: new ValueComparer<MaterialConstitutiveClass>(
                    bool (MaterialConstitutiveClass v1, MaterialConstitutiveClass v2) => object.Equals(((object)(v1)), ((object)(v2))),
                    int (MaterialConstitutiveClass v) => ((object)v).GetHashCode(),
                    MaterialConstitutiveClass (MaterialConstitutiveClass v) => v),
                providerValueComparer: new ValueComparer<string>(
                    bool (string v1, string v2) => v1 == v2,
                    int (string v) => ((object)v).GetHashCode(),
                    string (string v) => v),
                converter: new ValueConverter<MaterialConstitutiveClass, string>(
                    string (MaterialConstitutiveClass v) => ((object)v).ToString(),
                    MaterialConstitutiveClass (string v) => StringEnumConverter<MaterialConstitutiveClass, string, MaterialConstitutiveClass>.ConvertToEnum(v)),
                jsonValueReaderWriter: new JsonConvertedValueReaderWriter<MaterialConstitutiveClass, string>(
                    JsonStringReaderWriter.Instance,
                    new ValueConverter<MaterialConstitutiveClass, string>(
                        string (MaterialConstitutiveClass v) => ((object)v).ToString(),
                        MaterialConstitutiveClass (string v) => StringEnumConverter<MaterialConstitutiveClass, string, MaterialConstitutiveClass>.ConvertToEnum(v))));
            constitutiveClass.SetSentinelFromProviderValue("LinearElasticIsotropic");

            var designation = runtimeEntityType.AddProperty(
                "Designation",
                typeof(string),
                propertyInfo: typeof(MaterialEntity).GetProperty("Designation", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly),
                fieldInfo: typeof(MaterialEntity).GetField("<Designation>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly));
            designation.SetGetter(
                string (MaterialEntity instance) => MaterialEntityUnsafeAccessors.Designation(instance),
                bool (MaterialEntity instance) => MaterialEntityUnsafeAccessors.Designation(instance) == null);
            designation.SetSetter(
                MaterialEntity (MaterialEntity instance, string value) =>
                {
                    MaterialEntityUnsafeAccessors.Designation(instance) = value;
                    return instance;
                });
            designation.SetMaterializationSetter(
                MaterialEntity (MaterialEntity instance, string value) =>
                {
                    MaterialEntityUnsafeAccessors.Designation(instance) = value;
                    return instance;
                });
            designation.SetAccessors(
                string (IInternalEntry entry) => MaterialEntityUnsafeAccessors.Designation(((MaterialEntity)(entry.Entity))),
                string (IInternalEntry entry) => MaterialEntityUnsafeAccessors.Designation(((MaterialEntity)(entry.Entity))),
                string (IInternalEntry entry) => entry.ReadOriginalValue<string>(designation, 3),
                string (IInternalEntry entry) => entry.GetCurrentValue<string>(designation));
            designation.SetPropertyIndexes(
                index: 3,
                originalValueIndex: 3,
                shadowIndex: -1,
                relationshipIndex: -1,
                storeGenerationIndex: -1);
            designation.TypeMapping = SqliteStringTypeMapping.Default;

            var displayName = runtimeEntityType.AddProperty(
                "DisplayName",
                typeof(string),
                propertyInfo: typeof(MaterialEntity).GetProperty("DisplayName", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly),
                fieldInfo: typeof(MaterialEntity).GetField("<DisplayName>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly));
            displayName.SetGetter(
                string (MaterialEntity instance) => MaterialEntityUnsafeAccessors.DisplayName(instance),
                bool (MaterialEntity instance) => MaterialEntityUnsafeAccessors.DisplayName(instance) == null);
            displayName.SetSetter(
                MaterialEntity (MaterialEntity instance, string value) =>
                {
                    MaterialEntityUnsafeAccessors.DisplayName(instance) = value;
                    return instance;
                });
            displayName.SetMaterializationSetter(
                MaterialEntity (MaterialEntity instance, string value) =>
                {
                    MaterialEntityUnsafeAccessors.DisplayName(instance) = value;
                    return instance;
                });
            displayName.SetAccessors(
                string (IInternalEntry entry) => MaterialEntityUnsafeAccessors.DisplayName(((MaterialEntity)(entry.Entity))),
                string (IInternalEntry entry) => MaterialEntityUnsafeAccessors.DisplayName(((MaterialEntity)(entry.Entity))),
                string (IInternalEntry entry) => entry.ReadOriginalValue<string>(displayName, 4),
                string (IInternalEntry entry) => entry.GetCurrentValue<string>(displayName));
            displayName.SetPropertyIndexes(
                index: 4,
                originalValueIndex: 4,
                shadowIndex: -1,
                relationshipIndex: -1,
                storeGenerationIndex: -1);
            displayName.TypeMapping = SqliteStringTypeMapping.Default;

            var family = runtimeEntityType.AddProperty(
                "Family",
                typeof(string),
                propertyInfo: typeof(MaterialEntity).GetProperty("Family", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly),
                fieldInfo: typeof(MaterialEntity).GetField("<Family>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly));
            family.SetGetter(
                string (MaterialEntity instance) => MaterialEntityUnsafeAccessors.Family(instance),
                bool (MaterialEntity instance) => MaterialEntityUnsafeAccessors.Family(instance) == null);
            family.SetSetter(
                MaterialEntity (MaterialEntity instance, string value) =>
                {
                    MaterialEntityUnsafeAccessors.Family(instance) = value;
                    return instance;
                });
            family.SetMaterializationSetter(
                MaterialEntity (MaterialEntity instance, string value) =>
                {
                    MaterialEntityUnsafeAccessors.Family(instance) = value;
                    return instance;
                });
            family.SetAccessors(
                string (IInternalEntry entry) => MaterialEntityUnsafeAccessors.Family(((MaterialEntity)(entry.Entity))),
                string (IInternalEntry entry) => MaterialEntityUnsafeAccessors.Family(((MaterialEntity)(entry.Entity))),
                string (IInternalEntry entry) => entry.ReadOriginalValue<string>(family, 5),
                string (IInternalEntry entry) => entry.GetCurrentValue<string>(family));
            family.SetPropertyIndexes(
                index: 5,
                originalValueIndex: 5,
                shadowIndex: -1,
                relationshipIndex: -1,
                storeGenerationIndex: -1);
            family.TypeMapping = SqliteStringTypeMapping.Default;

            var firmamentPath = runtimeEntityType.AddProperty(
                "FirmamentPath",
                typeof(string),
                propertyInfo: typeof(MaterialEntity).GetProperty("FirmamentPath", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly),
                fieldInfo: typeof(MaterialEntity).GetField("<FirmamentPath>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly));
            firmamentPath.SetGetter(
                string (MaterialEntity instance) => MaterialEntityUnsafeAccessors.FirmamentPath(instance),
                bool (MaterialEntity instance) => MaterialEntityUnsafeAccessors.FirmamentPath(instance) == null);
            firmamentPath.SetSetter(
                MaterialEntity (MaterialEntity instance, string value) =>
                {
                    MaterialEntityUnsafeAccessors.FirmamentPath(instance) = value;
                    return instance;
                });
            firmamentPath.SetMaterializationSetter(
                MaterialEntity (MaterialEntity instance, string value) =>
                {
                    MaterialEntityUnsafeAccessors.FirmamentPath(instance) = value;
                    return instance;
                });
            firmamentPath.SetAccessors(
                string (IInternalEntry entry) => MaterialEntityUnsafeAccessors.FirmamentPath(((MaterialEntity)(entry.Entity))),
                string (IInternalEntry entry) => MaterialEntityUnsafeAccessors.FirmamentPath(((MaterialEntity)(entry.Entity))),
                string (IInternalEntry entry) => entry.ReadOriginalValue<string>(firmamentPath, 6),
                string (IInternalEntry entry) => entry.GetCurrentValue<string>(firmamentPath));
            firmamentPath.SetPropertyIndexes(
                index: 6,
                originalValueIndex: 6,
                shadowIndex: -1,
                relationshipIndex: -1,
                storeGenerationIndex: -1);
            firmamentPath.TypeMapping = SqliteStringTypeMapping.Default;
            firmamentPath.SetCurrentValueComparer(new EntryCurrentValueComparer<string>(firmamentPath));

            var grade = runtimeEntityType.AddProperty(
                "Grade",
                typeof(string),
                propertyInfo: typeof(MaterialEntity).GetProperty("Grade", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly),
                fieldInfo: typeof(MaterialEntity).GetField("<Grade>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly),
                nullable: true);
            grade.SetGetter(
                string (MaterialEntity instance) => MaterialEntityUnsafeAccessors.Grade(instance),
                bool (MaterialEntity instance) => MaterialEntityUnsafeAccessors.Grade(instance) == null);
            grade.SetSetter(
                MaterialEntity (MaterialEntity instance, string value) =>
                {
                    MaterialEntityUnsafeAccessors.Grade(instance) = value;
                    return instance;
                });
            grade.SetMaterializationSetter(
                MaterialEntity (MaterialEntity instance, string value) =>
                {
                    MaterialEntityUnsafeAccessors.Grade(instance) = value;
                    return instance;
                });
            grade.SetAccessors(
                string (IInternalEntry entry) => MaterialEntityUnsafeAccessors.Grade(((MaterialEntity)(entry.Entity))),
                string (IInternalEntry entry) => MaterialEntityUnsafeAccessors.Grade(((MaterialEntity)(entry.Entity))),
                string (IInternalEntry entry) => entry.ReadOriginalValue<string>(grade, 7),
                string (IInternalEntry entry) => entry.GetCurrentValue<string>(grade));
            grade.SetPropertyIndexes(
                index: 7,
                originalValueIndex: 7,
                shadowIndex: -1,
                relationshipIndex: -1,
                storeGenerationIndex: -1);
            grade.TypeMapping = SqliteStringTypeMapping.Default;

            var referenceCondition = runtimeEntityType.AddProperty(
                "ReferenceCondition",
                typeof(string),
                propertyInfo: typeof(MaterialEntity).GetProperty("ReferenceCondition", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly),
                fieldInfo: typeof(MaterialEntity).GetField("<ReferenceCondition>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly));
            referenceCondition.SetGetter(
                string (MaterialEntity instance) => MaterialEntityUnsafeAccessors.ReferenceCondition(instance),
                bool (MaterialEntity instance) => MaterialEntityUnsafeAccessors.ReferenceCondition(instance) == null);
            referenceCondition.SetSetter(
                MaterialEntity (MaterialEntity instance, string value) =>
                {
                    MaterialEntityUnsafeAccessors.ReferenceCondition(instance) = value;
                    return instance;
                });
            referenceCondition.SetMaterializationSetter(
                MaterialEntity (MaterialEntity instance, string value) =>
                {
                    MaterialEntityUnsafeAccessors.ReferenceCondition(instance) = value;
                    return instance;
                });
            referenceCondition.SetAccessors(
                string (IInternalEntry entry) => MaterialEntityUnsafeAccessors.ReferenceCondition(((MaterialEntity)(entry.Entity))),
                string (IInternalEntry entry) => MaterialEntityUnsafeAccessors.ReferenceCondition(((MaterialEntity)(entry.Entity))),
                string (IInternalEntry entry) => entry.ReadOriginalValue<string>(referenceCondition, 8),
                string (IInternalEntry entry) => entry.GetCurrentValue<string>(referenceCondition));
            referenceCondition.SetPropertyIndexes(
                index: 8,
                originalValueIndex: 8,
                shadowIndex: -1,
                relationshipIndex: -1,
                storeGenerationIndex: -1);
            referenceCondition.TypeMapping = SqliteStringTypeMapping.Default;

            var stableId = runtimeEntityType.AddProperty(
                "StableId",
                typeof(string),
                propertyInfo: typeof(MaterialEntity).GetProperty("StableId", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly),
                fieldInfo: typeof(MaterialEntity).GetField("<StableId>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly));
            stableId.SetGetter(
                string (MaterialEntity instance) => MaterialEntityUnsafeAccessors.StableId(instance),
                bool (MaterialEntity instance) => MaterialEntityUnsafeAccessors.StableId(instance) == null);
            stableId.SetSetter(
                MaterialEntity (MaterialEntity instance, string value) =>
                {
                    MaterialEntityUnsafeAccessors.StableId(instance) = value;
                    return instance;
                });
            stableId.SetMaterializationSetter(
                MaterialEntity (MaterialEntity instance, string value) =>
                {
                    MaterialEntityUnsafeAccessors.StableId(instance) = value;
                    return instance;
                });
            stableId.SetAccessors(
                string (IInternalEntry entry) => MaterialEntityUnsafeAccessors.StableId(((MaterialEntity)(entry.Entity))),
                string (IInternalEntry entry) => MaterialEntityUnsafeAccessors.StableId(((MaterialEntity)(entry.Entity))),
                string (IInternalEntry entry) => entry.ReadOriginalValue<string>(stableId, 9),
                string (IInternalEntry entry) => entry.GetCurrentValue<string>(stableId));
            stableId.SetPropertyIndexes(
                index: 9,
                originalValueIndex: 9,
                shadowIndex: -1,
                relationshipIndex: -1,
                storeGenerationIndex: -1);
            stableId.TypeMapping = SqliteStringTypeMapping.Default;
            stableId.SetCurrentValueComparer(new EntryCurrentValueComparer<string>(stableId));

            var standard = runtimeEntityType.AddProperty(
                "Standard",
                typeof(string),
                propertyInfo: typeof(MaterialEntity).GetProperty("Standard", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly),
                fieldInfo: typeof(MaterialEntity).GetField("<Standard>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly),
                nullable: true);
            standard.SetGetter(
                string (MaterialEntity instance) => MaterialEntityUnsafeAccessors.Standard(instance),
                bool (MaterialEntity instance) => MaterialEntityUnsafeAccessors.Standard(instance) == null);
            standard.SetSetter(
                MaterialEntity (MaterialEntity instance, string value) =>
                {
                    MaterialEntityUnsafeAccessors.Standard(instance) = value;
                    return instance;
                });
            standard.SetMaterializationSetter(
                MaterialEntity (MaterialEntity instance, string value) =>
                {
                    MaterialEntityUnsafeAccessors.Standard(instance) = value;
                    return instance;
                });
            standard.SetAccessors(
                string (IInternalEntry entry) => MaterialEntityUnsafeAccessors.Standard(((MaterialEntity)(entry.Entity))),
                string (IInternalEntry entry) => MaterialEntityUnsafeAccessors.Standard(((MaterialEntity)(entry.Entity))),
                string (IInternalEntry entry) => entry.ReadOriginalValue<string>(standard, 10),
                string (IInternalEntry entry) => entry.GetCurrentValue<string>(standard));
            standard.SetPropertyIndexes(
                index: 10,
                originalValueIndex: 10,
                shadowIndex: -1,
                relationshipIndex: -1,
                storeGenerationIndex: -1);
            standard.TypeMapping = SqliteStringTypeMapping.Default;

            var temper = runtimeEntityType.AddProperty(
                "Temper",
                typeof(string),
                propertyInfo: typeof(MaterialEntity).GetProperty("Temper", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly),
                fieldInfo: typeof(MaterialEntity).GetField("<Temper>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly),
                nullable: true);
            temper.SetGetter(
                string (MaterialEntity instance) => MaterialEntityUnsafeAccessors.Temper(instance),
                bool (MaterialEntity instance) => MaterialEntityUnsafeAccessors.Temper(instance) == null);
            temper.SetSetter(
                MaterialEntity (MaterialEntity instance, string value) =>
                {
                    MaterialEntityUnsafeAccessors.Temper(instance) = value;
                    return instance;
                });
            temper.SetMaterializationSetter(
                MaterialEntity (MaterialEntity instance, string value) =>
                {
                    MaterialEntityUnsafeAccessors.Temper(instance) = value;
                    return instance;
                });
            temper.SetAccessors(
                string (IInternalEntry entry) => MaterialEntityUnsafeAccessors.Temper(((MaterialEntity)(entry.Entity))),
                string (IInternalEntry entry) => MaterialEntityUnsafeAccessors.Temper(((MaterialEntity)(entry.Entity))),
                string (IInternalEntry entry) => entry.ReadOriginalValue<string>(temper, 11),
                string (IInternalEntry entry) => entry.GetCurrentValue<string>(temper));
            temper.SetPropertyIndexes(
                index: 11,
                originalValueIndex: 11,
                shadowIndex: -1,
                relationshipIndex: -1,
                storeGenerationIndex: -1);
            temper.TypeMapping = SqliteStringTypeMapping.Default;

            var key = runtimeEntityType.AddKey(
                new[] { id });
            runtimeEntityType.SetPrimaryKey(key);

            var index = runtimeEntityType.AddIndex(
                new[] { firmamentPath },
                unique: true);

            var index0 = runtimeEntityType.AddIndex(
                new[] { catalogId, stableId },
                unique: true);

            return runtimeEntityType;
        }

        public static void CreateAnnotations(RuntimeEntityType runtimeEntityType)
        {
            var id = runtimeEntityType.FindProperty("Id");
            var catalogId = runtimeEntityType.FindProperty("CatalogId");
            var constitutiveClass = runtimeEntityType.FindProperty("ConstitutiveClass");
            var designation = runtimeEntityType.FindProperty("Designation");
            var displayName = runtimeEntityType.FindProperty("DisplayName");
            var family = runtimeEntityType.FindProperty("Family");
            var firmamentPath = runtimeEntityType.FindProperty("FirmamentPath");
            var grade = runtimeEntityType.FindProperty("Grade");
            var referenceCondition = runtimeEntityType.FindProperty("ReferenceCondition");
            var stableId = runtimeEntityType.FindProperty("StableId");
            var standard = runtimeEntityType.FindProperty("Standard");
            var temper = runtimeEntityType.FindProperty("Temper");
            var key = runtimeEntityType.FindKey(new[] { id });
            key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory<int>(key));
            key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<int>(key));
            var properties = runtimeEntityType.FindNavigation("Properties");
            runtimeEntityType.SetOriginalValuesFactory(
                ISnapshot (IInternalEntry source) =>
                {
                    var structuralType = ((MaterialEntity)(source.Entity));
                    return ((ISnapshot)(new Snapshot<int, string, MaterialConstitutiveClass, string, string, string, string, string, string, string, string, string>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), (source.GetCurrentValue<string>(catalogId) == null ? null : ((ValueComparer<string>)(((IProperty)catalogId).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(catalogId))), ((ValueComparer<MaterialConstitutiveClass>)(((IProperty)constitutiveClass).GetValueComparer())).Snapshot(source.GetCurrentValue<MaterialConstitutiveClass>(constitutiveClass)), (source.GetCurrentValue<string>(designation) == null ? null : ((ValueComparer<string>)(((IProperty)designation).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(designation))), (source.GetCurrentValue<string>(displayName) == null ? null : ((ValueComparer<string>)(((IProperty)displayName).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(displayName))), (source.GetCurrentValue<string>(family) == null ? null : ((ValueComparer<string>)(((IProperty)family).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(family))), (source.GetCurrentValue<string>(firmamentPath) == null ? null : ((ValueComparer<string>)(((IProperty)firmamentPath).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(firmamentPath))), (source.GetCurrentValue<string>(grade) == null ? null : ((ValueComparer<string>)(((IProperty)grade).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(grade))), (source.GetCurrentValue<string>(referenceCondition) == null ? null : ((ValueComparer<string>)(((IProperty)referenceCondition).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(referenceCondition))), (source.GetCurrentValue<string>(stableId) == null ? null : ((ValueComparer<string>)(((IProperty)stableId).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stableId))), (source.GetCurrentValue<string>(standard) == null ? null : ((ValueComparer<string>)(((IProperty)standard).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(standard))), (source.GetCurrentValue<string>(temper) == null ? null : ((ValueComparer<string>)(((IProperty)temper).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(temper))))));
                });
            runtimeEntityType.SetStoreGeneratedValuesFactory(
                ISnapshot () => ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(default(int))))));
            runtimeEntityType.SetTemporaryValuesFactory(
                ISnapshot (IInternalEntry source) => ((ISnapshot)(new Snapshot<int>(default(int)))));
            runtimeEntityType.SetShadowValuesFactory(
                ISnapshot (IDictionary<string, object> source) => Snapshot.Empty);
            runtimeEntityType.SetEmptyShadowValuesFactory(
                ISnapshot () => Snapshot.Empty);
            runtimeEntityType.SetRelationshipSnapshotFactory(
                ISnapshot (IInternalEntry source) =>
                {
                    var structuralType = ((MaterialEntity)(source.Entity));
                    return ((ISnapshot)(new Snapshot<int, object>(((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), SnapshotFactoryFactory.SnapshotCollection(source.GetCurrentValue<ICollection<MaterialPropertyEntity>>(properties)))));
                });
            runtimeEntityType.SetCounts(new PropertyCounts(
                propertyCount: 12,
                navigationCount: 1,
                complexPropertyCount: 0,
                complexCollectionCount: 0,
                originalValueCount: 12,
                shadowCount: 0,
                relationshipCount: 2,
                storeGeneratedCount: 1));
            runtimeEntityType.AddAnnotation("Relational:FunctionName", null);
            runtimeEntityType.AddAnnotation("Relational:Schema", null);
            runtimeEntityType.AddAnnotation("Relational:SqlQuery", null);
            runtimeEntityType.AddAnnotation("Relational:TableName", "Materials");
            runtimeEntityType.AddAnnotation("Relational:ViewName", null);
            runtimeEntityType.AddAnnotation("Relational:ViewSchema", null);

            Customize(runtimeEntityType);
        }

        static partial void Customize(RuntimeEntityType runtimeEntityType);
    }
}