diff --git a/Projects/DLL/SystemX.Core.DB.dll b/Projects/DLL/SystemX.Core.DB.dll index 45ce1d1..b8b1118 100644 Binary files a/Projects/DLL/SystemX.Core.DB.dll and b/Projects/DLL/SystemX.Core.DB.dll differ diff --git a/Projects/DLL/SystemX.Core.dll b/Projects/DLL/SystemX.Core.dll index f2cf488..6f25c2b 100644 Binary files a/Projects/DLL/SystemX.Core.dll and b/Projects/DLL/SystemX.Core.dll differ diff --git a/Projects/SystemX.Core/SystemX.Core.DB/UniqueKeyDB/Context/UniqueKeyDBContext.cs b/Projects/SystemX.Core/SystemX.Core.DB/UniqueKeyDB/Context/UniqueKeyDBContext.cs index 779c2b4..66decdb 100644 --- a/Projects/SystemX.Core/SystemX.Core.DB/UniqueKeyDB/Context/UniqueKeyDBContext.cs +++ b/Projects/SystemX.Core/SystemX.Core.DB/UniqueKeyDB/Context/UniqueKeyDBContext.cs @@ -11,10 +11,26 @@ public partial class UniqueKeyDBContext : DbContext { } + public virtual DbSet tPairKeyStorages { get; set; } + public virtual DbSet tUniqueKeyStorages { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) { + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.cPrimaryKey).HasName("PK_cProductKey"); + + entity.ToTable("tPairKeyStorage"); + + entity.HasIndex(e => e.cSecondaryKey, "UQ_cMacAddress").IsUnique(); + + entity.Property(e => e.cPrimaryKey).HasMaxLength(50); + entity.Property(e => e.cSecondaryKey).HasMaxLength(50); + entity.Property(e => e.cValue1).HasMaxLength(200); + entity.Property(e => e.cValue2).HasMaxLength(200); + }); + modelBuilder.Entity(entity => { entity.HasKey(e => e.cIdentity).HasName("PK__tUniqueK__3EBC650DADDCD506"); diff --git a/Projects/SystemX.Core/SystemX.Core.DB/UniqueKeyDB/Tables/tPairKeyStorage.cs b/Projects/SystemX.Core/SystemX.Core.DB/UniqueKeyDB/Tables/tPairKeyStorage.cs new file mode 100644 index 0000000..cb30c1d --- /dev/null +++ b/Projects/SystemX.Core/SystemX.Core.DB/UniqueKeyDB/Tables/tPairKeyStorage.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +namespace SystemX.Core.DB; + +public partial class tPairKeyStorage +{ + public string cPrimaryKey { get; set; } = null!; + + public string cSecondaryKey { get; set; } = null!; + + public string? cValue1 { get; set; } + + public string? cValue2 { get; set; } + + public DateTime cDateTime { get; set; } +}