250 lines
15 KiB
C#
250 lines
15 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Reflection;
|
|
using Blink.Backoffice.Services.PcmDb.Entities;
|
|
using Microsoft.EntityFrameworkCore.ChangeTracking;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal;
|
|
using Microsoft.EntityFrameworkCore.Storage;
|
|
|
|
#pragma warning disable 219, 612, 618
|
|
#nullable disable
|
|
|
|
namespace Blink.Backoffice.Services.PcmDb.CompiledEntities
|
|
{
|
|
internal partial class ProfilKonfigEntityType
|
|
{
|
|
public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType baseEntityType = null)
|
|
{
|
|
var runtimeEntityType = model.AddEntityType(
|
|
"Blink.Backoffice.Services.PcmDb.Entities.ProfilKonfig",
|
|
typeof(ProfilKonfig),
|
|
baseEntityType);
|
|
|
|
var profilId = runtimeEntityType.AddProperty(
|
|
"ProfilId",
|
|
typeof(decimal),
|
|
propertyInfo: typeof(ProfilKonfig).GetProperty("ProfilId", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly),
|
|
fieldInfo: typeof(ProfilKonfig).GetField("<ProfilId>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly),
|
|
afterSaveBehavior: PropertySaveBehavior.Throw,
|
|
sentinel: 0m);
|
|
profilId.TypeMapping = SqlServerDecimalTypeMapping.Default.Clone(
|
|
comparer: new ValueComparer<decimal>(
|
|
(decimal v1, decimal v2) => v1 == v2,
|
|
(decimal v) => v.GetHashCode(),
|
|
(decimal v) => v),
|
|
keyComparer: new ValueComparer<decimal>(
|
|
(decimal v1, decimal v2) => v1 == v2,
|
|
(decimal v) => v.GetHashCode(),
|
|
(decimal v) => v),
|
|
providerValueComparer: new ValueComparer<decimal>(
|
|
(decimal v1, decimal v2) => v1 == v2,
|
|
(decimal v) => v.GetHashCode(),
|
|
(decimal v) => v),
|
|
mappingInfo: new RelationalTypeMappingInfo(
|
|
storeTypeName: "numeric(9,0)",
|
|
precision: 9,
|
|
scale: 0));
|
|
profilId.AddAnnotation("Relational:ColumnType", "numeric(9, 0)");
|
|
profilId.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None);
|
|
|
|
var parGrupa = runtimeEntityType.AddProperty(
|
|
"ParGrupa",
|
|
typeof(string),
|
|
propertyInfo: typeof(ProfilKonfig).GetProperty("ParGrupa", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly),
|
|
fieldInfo: typeof(ProfilKonfig).GetField("<ParGrupa>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly),
|
|
afterSaveBehavior: PropertySaveBehavior.Throw,
|
|
maxLength: 255,
|
|
unicode: false);
|
|
parGrupa.TypeMapping = SqlServerStringTypeMapping.Default.Clone(
|
|
comparer: new ValueComparer<string>(
|
|
(string l, string r) => string.Equals(l, r, StringComparison.OrdinalIgnoreCase),
|
|
(string v) => v == null ? 0 : StringComparer.OrdinalIgnoreCase.GetHashCode(v),
|
|
(string v) => v),
|
|
keyComparer: new ValueComparer<string>(
|
|
(string l, string r) => string.Equals(l, r, StringComparison.OrdinalIgnoreCase),
|
|
(string v) => v == null ? 0 : StringComparer.OrdinalIgnoreCase.GetHashCode(v),
|
|
(string v) => v),
|
|
providerValueComparer: new ValueComparer<string>(
|
|
(string l, string r) => string.Equals(l, r, StringComparison.OrdinalIgnoreCase),
|
|
(string v) => v == null ? 0 : StringComparer.OrdinalIgnoreCase.GetHashCode(v),
|
|
(string v) => v),
|
|
mappingInfo: new RelationalTypeMappingInfo(
|
|
storeTypeName: "varchar(255)",
|
|
size: 255));
|
|
parGrupa.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None);
|
|
|
|
var parNazwa = runtimeEntityType.AddProperty(
|
|
"ParNazwa",
|
|
typeof(string),
|
|
propertyInfo: typeof(ProfilKonfig).GetProperty("ParNazwa", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly),
|
|
fieldInfo: typeof(ProfilKonfig).GetField("<ParNazwa>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly),
|
|
afterSaveBehavior: PropertySaveBehavior.Throw,
|
|
maxLength: 255,
|
|
unicode: false);
|
|
parNazwa.TypeMapping = SqlServerStringTypeMapping.Default.Clone(
|
|
comparer: new ValueComparer<string>(
|
|
(string l, string r) => string.Equals(l, r, StringComparison.OrdinalIgnoreCase),
|
|
(string v) => v == null ? 0 : StringComparer.OrdinalIgnoreCase.GetHashCode(v),
|
|
(string v) => v),
|
|
keyComparer: new ValueComparer<string>(
|
|
(string l, string r) => string.Equals(l, r, StringComparison.OrdinalIgnoreCase),
|
|
(string v) => v == null ? 0 : StringComparer.OrdinalIgnoreCase.GetHashCode(v),
|
|
(string v) => v),
|
|
providerValueComparer: new ValueComparer<string>(
|
|
(string l, string r) => string.Equals(l, r, StringComparison.OrdinalIgnoreCase),
|
|
(string v) => v == null ? 0 : StringComparer.OrdinalIgnoreCase.GetHashCode(v),
|
|
(string v) => v),
|
|
mappingInfo: new RelationalTypeMappingInfo(
|
|
storeTypeName: "varchar(255)",
|
|
size: 255));
|
|
parNazwa.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None);
|
|
|
|
var kolejny = runtimeEntityType.AddProperty(
|
|
"Kolejny",
|
|
typeof(short),
|
|
propertyInfo: typeof(ProfilKonfig).GetProperty("Kolejny", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly),
|
|
fieldInfo: typeof(ProfilKonfig).GetField("<Kolejny>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly),
|
|
afterSaveBehavior: PropertySaveBehavior.Throw,
|
|
sentinel: (short)0);
|
|
kolejny.TypeMapping = SqlServerShortTypeMapping.Default.Clone(
|
|
comparer: new ValueComparer<short>(
|
|
(short v1, short v2) => v1 == v2,
|
|
(short v) => (int)v,
|
|
(short v) => v),
|
|
keyComparer: new ValueComparer<short>(
|
|
(short v1, short v2) => v1 == v2,
|
|
(short v) => (int)v,
|
|
(short v) => v),
|
|
providerValueComparer: new ValueComparer<short>(
|
|
(short v1, short v2) => v1 == v2,
|
|
(short v) => (int)v,
|
|
(short v) => v));
|
|
kolejny.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None);
|
|
|
|
var utworzony = runtimeEntityType.AddProperty(
|
|
"Utworzony",
|
|
typeof(DateTime?),
|
|
propertyInfo: typeof(ProfilKonfig).GetProperty("Utworzony", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly),
|
|
fieldInfo: typeof(ProfilKonfig).GetField("<Utworzony>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly),
|
|
nullable: true);
|
|
utworzony.TypeMapping = SqlServerDateTimeTypeMapping.Default.Clone(
|
|
comparer: new ValueComparer<DateTime?>(
|
|
(Nullable<DateTime> v1, Nullable<DateTime> v2) => v1.HasValue && v2.HasValue && (DateTime)v1 == (DateTime)v2 || !v1.HasValue && !v2.HasValue,
|
|
(Nullable<DateTime> v) => v.HasValue ? ((DateTime)v).GetHashCode() : 0,
|
|
(Nullable<DateTime> v) => v.HasValue ? (Nullable<DateTime>)(DateTime)v : default(Nullable<DateTime>)),
|
|
keyComparer: new ValueComparer<DateTime?>(
|
|
(Nullable<DateTime> v1, Nullable<DateTime> v2) => v1.HasValue && v2.HasValue && (DateTime)v1 == (DateTime)v2 || !v1.HasValue && !v2.HasValue,
|
|
(Nullable<DateTime> v) => v.HasValue ? ((DateTime)v).GetHashCode() : 0,
|
|
(Nullable<DateTime> v) => v.HasValue ? (Nullable<DateTime>)(DateTime)v : default(Nullable<DateTime>)),
|
|
providerValueComparer: new ValueComparer<DateTime?>(
|
|
(Nullable<DateTime> v1, Nullable<DateTime> v2) => v1.HasValue && v2.HasValue && (DateTime)v1 == (DateTime)v2 || !v1.HasValue && !v2.HasValue,
|
|
(Nullable<DateTime> v) => v.HasValue ? ((DateTime)v).GetHashCode() : 0,
|
|
(Nullable<DateTime> v) => v.HasValue ? (Nullable<DateTime>)(DateTime)v : default(Nullable<DateTime>)),
|
|
mappingInfo: new RelationalTypeMappingInfo(
|
|
storeTypeName: "datetime",
|
|
dbType: System.Data.DbType.DateTime));
|
|
utworzony.AddAnnotation("Relational:ColumnType", "datetime");
|
|
utworzony.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None);
|
|
|
|
var wartosc = runtimeEntityType.AddProperty(
|
|
"Wartosc",
|
|
typeof(string),
|
|
propertyInfo: typeof(ProfilKonfig).GetProperty("Wartosc", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly),
|
|
fieldInfo: typeof(ProfilKonfig).GetField("<Wartosc>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly),
|
|
nullable: true,
|
|
maxLength: 255,
|
|
unicode: false);
|
|
wartosc.TypeMapping = SqlServerStringTypeMapping.Default.Clone(
|
|
comparer: new ValueComparer<string>(
|
|
(string v1, string v2) => v1 == v2,
|
|
(string v) => v.GetHashCode(),
|
|
(string v) => v),
|
|
keyComparer: new ValueComparer<string>(
|
|
(string v1, string v2) => v1 == v2,
|
|
(string v) => v.GetHashCode(),
|
|
(string v) => v),
|
|
providerValueComparer: new ValueComparer<string>(
|
|
(string v1, string v2) => v1 == v2,
|
|
(string v) => v.GetHashCode(),
|
|
(string v) => v),
|
|
mappingInfo: new RelationalTypeMappingInfo(
|
|
storeTypeName: "varchar(255)",
|
|
size: 255));
|
|
wartosc.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None);
|
|
|
|
var zmiana = runtimeEntityType.AddProperty(
|
|
"Zmiana",
|
|
typeof(DateTime?),
|
|
propertyInfo: typeof(ProfilKonfig).GetProperty("Zmiana", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly),
|
|
fieldInfo: typeof(ProfilKonfig).GetField("<Zmiana>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly),
|
|
nullable: true);
|
|
zmiana.TypeMapping = SqlServerDateTimeTypeMapping.Default.Clone(
|
|
comparer: new ValueComparer<DateTime?>(
|
|
(Nullable<DateTime> v1, Nullable<DateTime> v2) => v1.HasValue && v2.HasValue && (DateTime)v1 == (DateTime)v2 || !v1.HasValue && !v2.HasValue,
|
|
(Nullable<DateTime> v) => v.HasValue ? ((DateTime)v).GetHashCode() : 0,
|
|
(Nullable<DateTime> v) => v.HasValue ? (Nullable<DateTime>)(DateTime)v : default(Nullable<DateTime>)),
|
|
keyComparer: new ValueComparer<DateTime?>(
|
|
(Nullable<DateTime> v1, Nullable<DateTime> v2) => v1.HasValue && v2.HasValue && (DateTime)v1 == (DateTime)v2 || !v1.HasValue && !v2.HasValue,
|
|
(Nullable<DateTime> v) => v.HasValue ? ((DateTime)v).GetHashCode() : 0,
|
|
(Nullable<DateTime> v) => v.HasValue ? (Nullable<DateTime>)(DateTime)v : default(Nullable<DateTime>)),
|
|
providerValueComparer: new ValueComparer<DateTime?>(
|
|
(Nullable<DateTime> v1, Nullable<DateTime> v2) => v1.HasValue && v2.HasValue && (DateTime)v1 == (DateTime)v2 || !v1.HasValue && !v2.HasValue,
|
|
(Nullable<DateTime> v) => v.HasValue ? ((DateTime)v).GetHashCode() : 0,
|
|
(Nullable<DateTime> v) => v.HasValue ? (Nullable<DateTime>)(DateTime)v : default(Nullable<DateTime>)),
|
|
mappingInfo: new RelationalTypeMappingInfo(
|
|
storeTypeName: "datetime",
|
|
dbType: System.Data.DbType.DateTime));
|
|
zmiana.AddAnnotation("Relational:ColumnType", "datetime");
|
|
zmiana.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None);
|
|
|
|
var key = runtimeEntityType.AddKey(
|
|
new[] { profilId, parGrupa, parNazwa, kolejny });
|
|
runtimeEntityType.SetPrimaryKey(key);
|
|
key.AddAnnotation("Relational:Name", "PK_PROFIL_KONFIG");
|
|
|
|
return runtimeEntityType;
|
|
}
|
|
|
|
public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEntityType, RuntimeEntityType principalEntityType)
|
|
{
|
|
var runtimeForeignKey = declaringEntityType.AddForeignKey(new[] { declaringEntityType.FindProperty("ProfilId") },
|
|
principalEntityType.FindKey(new[] { principalEntityType.FindProperty("ProfilId") }),
|
|
principalEntityType,
|
|
required: true);
|
|
|
|
var profil = declaringEntityType.AddNavigation("Profil",
|
|
runtimeForeignKey,
|
|
onDependent: true,
|
|
typeof(Profil),
|
|
propertyInfo: typeof(ProfilKonfig).GetProperty("Profil", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly),
|
|
fieldInfo: typeof(ProfilKonfig).GetField("<Profil>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly));
|
|
|
|
var profilKonfig = principalEntityType.AddNavigation("ProfilKonfig",
|
|
runtimeForeignKey,
|
|
onDependent: false,
|
|
typeof(ICollection<ProfilKonfig>),
|
|
propertyInfo: typeof(Profil).GetProperty("ProfilKonfig", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly),
|
|
fieldInfo: typeof(Profil).GetField("<ProfilKonfig>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly));
|
|
|
|
runtimeForeignKey.AddAnnotation("Relational:Name", "FK_PROFILKONFIG_REFERENCE_PROFIL");
|
|
return runtimeForeignKey;
|
|
}
|
|
|
|
public static void CreateAnnotations(RuntimeEntityType runtimeEntityType)
|
|
{
|
|
runtimeEntityType.AddAnnotation("Relational:FunctionName", null);
|
|
runtimeEntityType.AddAnnotation("Relational:Schema", null);
|
|
runtimeEntityType.AddAnnotation("Relational:SqlQuery", null);
|
|
runtimeEntityType.AddAnnotation("Relational:TableName", "ProfilKonfig");
|
|
runtimeEntityType.AddAnnotation("Relational:ViewName", null);
|
|
runtimeEntityType.AddAnnotation("Relational:ViewSchema", null);
|
|
|
|
Customize(runtimeEntityType);
|
|
}
|
|
|
|
static partial void Customize(RuntimeEntityType runtimeEntityType);
|
|
}
|
|
}
|