diff --git a/Persistence.Benchmark/DD.Persistence.Benchmark.csproj b/DD.Persistence.Benchmark/DD.Persistence.Benchmark.csproj similarity index 94% rename from Persistence.Benchmark/DD.Persistence.Benchmark.csproj rename to DD.Persistence.Benchmark/DD.Persistence.Benchmark.csproj index 3f154ee..87bb221 100644 --- a/Persistence.Benchmark/DD.Persistence.Benchmark.csproj +++ b/DD.Persistence.Benchmark/DD.Persistence.Benchmark.csproj @@ -9,7 +9,6 @@ - diff --git a/Persistence.Benchmark/Database/BenchmarkDbContext.cs b/DD.Persistence.Benchmark/Database/BenchmarkDbContext.cs similarity index 67% rename from Persistence.Benchmark/Database/BenchmarkDbContext.cs rename to DD.Persistence.Benchmark/Database/BenchmarkDbContext.cs index d9a532b..7a0e054 100644 --- a/Persistence.Benchmark/Database/BenchmarkDbContext.cs +++ b/DD.Persistence.Benchmark/Database/BenchmarkDbContext.cs @@ -1,11 +1,11 @@ using Microsoft.EntityFrameworkCore; -using Persistence.Benchmark.Database.Entities; using DD.Persistence.Database; +using DD.Persistence.Database.Entity; namespace Persistence.Benchmark.Database; public class BenchmarkDbContext : PersistenceDbContext { - public new DbSet ParameterData => Set(); + public DbSet ParameterData => Set(); public BenchmarkDbContext(DbContextOptions options) : base(options) { } diff --git a/Persistence.Benchmark/Database/DbConnection.cs b/DD.Persistence.Benchmark/Database/DbConnection.cs similarity index 100% rename from Persistence.Benchmark/Database/DbConnection.cs rename to DD.Persistence.Benchmark/Database/DbConnection.cs diff --git a/Persistence.Benchmark/Program.cs b/DD.Persistence.Benchmark/Program.cs similarity index 54% rename from Persistence.Benchmark/Program.cs rename to DD.Persistence.Benchmark/Program.cs index a9285c2..a3cfef2 100644 --- a/Persistence.Benchmark/Program.cs +++ b/DD.Persistence.Benchmark/Program.cs @@ -1,8 +1,4 @@ -using BenchmarkDotNet.Running; -using Persistence.Benchmark; -using Persistence.Benchmark.Tests; -using DD.Persistence.API; -using System.Runtime.InteropServices; +using Persistence.Benchmark.Tests; public class Program { diff --git a/Persistence.Benchmark/TestHttpClientFactory.cs b/DD.Persistence.Benchmark/TestHttpClientFactory.cs similarity index 100% rename from Persistence.Benchmark/TestHttpClientFactory.cs rename to DD.Persistence.Benchmark/TestHttpClientFactory.cs diff --git a/Persistence.Benchmark/Tests/WitsDataBenchmark.cs b/DD.Persistence.Benchmark/Tests/WitsDataBenchmark.cs similarity index 77% rename from Persistence.Benchmark/Tests/WitsDataBenchmark.cs rename to DD.Persistence.Benchmark/Tests/WitsDataBenchmark.cs index 0b2ecb7..7e5d936 100644 --- a/Persistence.Benchmark/Tests/WitsDataBenchmark.cs +++ b/DD.Persistence.Benchmark/Tests/WitsDataBenchmark.cs @@ -8,6 +8,7 @@ namespace Persistence.Benchmark.Tests; public static class WitsDataBenchmark { private const string discriminatorId = "fef21bfd-e924-473d-b6c8-e4377e38245d"; + private const int chunkSize = 25_000; public static async Task ExecuteTest(int count) { @@ -24,11 +25,6 @@ public static class WitsDataBenchmark var data = GenerateData(count); var sw = new Stopwatch(); - - - var abscissaData = new List() { }; - var ordinateData = new List() { }; - var saved = 0; foreach (var item in data) { @@ -37,23 +33,20 @@ public static class WitsDataBenchmark sw.Start(); var response = await client.AddRange(item, source.Token); sw.Stop(); - - Console.WriteLine($"Сохранено: {response.ToString()}"); saved = saved + response; - abscissaData.Add(saved / 100_000); - - Console.WriteLine($"Затрачено времени на сохранение части: {sw.Elapsed - time}"); - ordinateData.Add((double)(sw.Elapsed - time).TotalSeconds); + Console.WriteLine($"Сохранено: {saved.ToString()}"); } Console.WriteLine($"Затрачено времени на сохранение: {sw.Elapsed}"); - var dis = Guid.Parse(discriminatorId); + var discriminator = Guid.Parse(discriminatorId); var date = DateTime.Now.AddDays(-1); + Console.WriteLine($"\nВычитка..."); + sw = new Stopwatch(); sw.Start(); - var get = await client.GetPart(dis, date, count, source.Token); + var get = await client.GetPart(discriminator, date, count, source.Token); sw.Stop(); Console.WriteLine($"Затрачено времени на вычитку: {sw.Elapsed}"); @@ -68,16 +61,18 @@ public static class WitsDataBenchmark { var result = new List>(); - int enumerableCount = countToCreate / 25_000 + (countToCreate % 25_000 == 0 ? 0 : 1); + int enumerableCount = countToCreate / chunkSize + (countToCreate % chunkSize == 0 ? 0 : 1); for (var k = 0; k < enumerableCount; k++) { var dtos = new List(); for (var j = 0; j < 1000; j++) { - for (var i = 0; i < 25; i++) + for (var i = 0; i < chunkSize / 1000; i++) { - var timestamped = DateTimeOffset.UtcNow; var random = new Random(); + + var timestamped = DateTimeOffset.UtcNow.AddSeconds(random.Next(1, 60 * 60 * 24) * -1); + dtos.Add(new WitsDataDto() { DiscriminatorId = Guid.Parse(discriminatorId), diff --git a/Persistence.Benchmark/WebAppFactoryFixture.cs b/DD.Persistence.Benchmark/WebAppFactoryFixture.cs similarity index 100% rename from Persistence.Benchmark/WebAppFactoryFixture.cs rename to DD.Persistence.Benchmark/WebAppFactoryFixture.cs diff --git a/DD.Persistence.Database.Postgres/Migrations/20241222112828_ParameterDataMigration.cs b/DD.Persistence.Database.Postgres/Migrations/20241222112828_ParameterDataMigration.cs deleted file mode 100644 index cb08b16..0000000 --- a/DD.Persistence.Database.Postgres/Migrations/20241222112828_ParameterDataMigration.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace DD.Persistence.Database.Postgres.Migrations.PersistencePostgres -{ - /// - public partial class ParameterDataMigration : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "ParameterData", - columns: table => new - { - DiscriminatorId = table.Column(type: "uuid", nullable: false, comment: "Дискриминатор системы"), - ParameterId = table.Column(type: "integer", nullable: false, comment: "Id параметра") - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - Timestamp = table.Column(type: "timestamp with time zone", nullable: false, comment: "Временная отметка"), - Value = table.Column(type: "varchar(256)", nullable: true, comment: "Значение параметра в виде строки") - }, - constraints: table => - { - table.PrimaryKey("PK_ParameterData", x => new { x.DiscriminatorId, x.ParameterId, x.Timestamp }); - }); - - string sql; - for (int i = 1; i <= 25; i++) - { - sql = $"create table if not exists \"ParameterData{i}\" (like public.\"ParameterData\" including all) inherits (public.\"ParameterData\");"; - migrationBuilder.Sql(sql); - } - - //sql = "create or replace function partition_for_parameter_data() returns trigger as $$ " + - // "DECLARE " + - // " v_parition_name text; " + - // "BEGIN " + - // " v_parition_name := format( 'ParameterData%s', NEW.\"ParameterId\" / 1000 ); " + - // " execute 'INSERT INTO public.\"' || v_parition_name || '\" VALUES ( ($1).* )' USING NEW; " + - // " return NULL; " + - // "END; " + - // "$$ language plpgsql;"; - //migrationBuilder.Sql(sql); - - //sql = "create or replace trigger partition_parameter_data " + - // "before insert on public.\"ParameterData\" " + - // "for each row execute procedure public.partition_for_parameter_data();"; - //migrationBuilder.Sql(sql); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "ParameterData"); - } - } -} diff --git a/DD.Persistence.Database.Postgres/Migrations/20241220062251_Init.Designer.cs b/DD.Persistence.Database.Postgres/Migrations/20241225094516_Init.Designer.cs similarity index 91% rename from DD.Persistence.Database.Postgres/Migrations/20241220062251_Init.Designer.cs rename to DD.Persistence.Database.Postgres/Migrations/20241225094516_Init.Designer.cs index 19e0ca8..49436f3 100644 --- a/DD.Persistence.Database.Postgres/Migrations/20241220062251_Init.Designer.cs +++ b/DD.Persistence.Database.Postgres/Migrations/20241225094516_Init.Designer.cs @@ -12,7 +12,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; namespace DD.Persistence.Database.Postgres.Migrations { [DbContext(typeof(PersistencePostgresContext))] - [Migration("20241220062251_Init")] + [Migration("20241225094516_Init")] partial class Init { /// @@ -20,7 +20,7 @@ namespace DD.Persistence.Database.Postgres.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "8.0.10") + .HasAnnotation("ProductVersion", "9.0.0") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); @@ -46,6 +46,30 @@ namespace DD.Persistence.Database.Postgres.Migrations b.ToTable("DataSourceSystem"); }); + modelBuilder.Entity("DD.Persistence.Database.Entity.ParameterData", b => + { + b.Property("DiscriminatorId") + .HasColumnType("uuid") + .HasComment("Дискриминатор системы"); + + b.Property("ParameterId") + .HasColumnType("integer") + .HasComment("Id параметра"); + + b.Property("Timestamp") + .HasColumnType("timestamp with time zone") + .HasComment("Временная отметка"); + + b.Property("Value") + .IsRequired() + .HasColumnType("jsonb") + .HasComment("Значение параметра"); + + b.HasKey("DiscriminatorId", "ParameterId", "Timestamp"); + + b.ToTable("ParameterData"); + }); + modelBuilder.Entity("DD.Persistence.Database.Entity.TechMessage", b => { b.Property("EventId") diff --git a/DD.Persistence.Database.Postgres/Migrations/20241220062251_Init.cs b/DD.Persistence.Database.Postgres/Migrations/20241225094516_Init.cs similarity index 98% rename from DD.Persistence.Database.Postgres/Migrations/20241220062251_Init.cs rename to DD.Persistence.Database.Postgres/Migrations/20241225094516_Init.cs index 03a8c43..0f84480 100644 --- a/DD.Persistence.Database.Postgres/Migrations/20241220062251_Init.cs +++ b/DD.Persistence.Database.Postgres/Migrations/20241225094516_Init.cs @@ -81,7 +81,7 @@ namespace DD.Persistence.Database.Postgres.Migrations DiscriminatorId = table.Column(type: "uuid", nullable: false, comment: "Дискриминатор системы"), ParameterId = table.Column(type: "integer", nullable: false, comment: "Id параметра"), Timestamp = table.Column(type: "timestamp with time zone", nullable: false, comment: "Временная отметка"), - Value = table.Column(type: "varchar(256)", nullable: false, comment: "Значение параметра в виде строки") + Value = table.Column(type: "jsonb", nullable: false, comment: "Значение параметра") }, constraints: table => { diff --git a/DD.Persistence.Database.Postgres/Migrations/PersistencePostgresContextModelSnapshot.cs b/DD.Persistence.Database.Postgres/Migrations/PersistencePostgresContextModelSnapshot.cs index 9554aa8..d3f619f 100644 --- a/DD.Persistence.Database.Postgres/Migrations/PersistencePostgresContextModelSnapshot.cs +++ b/DD.Persistence.Database.Postgres/Migrations/PersistencePostgresContextModelSnapshot.cs @@ -17,7 +17,7 @@ namespace DD.Persistence.Database.Postgres.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "8.0.10") + .HasAnnotation("ProductVersion", "9.0.0") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); @@ -46,32 +46,27 @@ namespace DD.Persistence.Database.Postgres.Migrations modelBuilder.Entity("DD.Persistence.Database.Entity.ParameterData", b => { b.Property("DiscriminatorId") - .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasComment("Дискриминатор системы"); b.Property("ParameterId") - .ValueGeneratedOnAdd() .HasColumnType("integer") .HasComment("Id параметра"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("ParameterId")); - b.Property("Timestamp") - .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasComment("Временная отметка"); - b.Property("Value") - .HasColumnType("varchar(256)") - .HasComment("Значение параметра в виде строки"); + b.Property("Value") + .IsRequired() + .HasColumnType("jsonb") + .HasComment("Значение параметра"); b.HasKey("DiscriminatorId", "ParameterId", "Timestamp"); b.ToTable("ParameterData"); }); - modelBuilder.Entity("DD.Persistence.Database.Entity.TechMessage", b => { b.Property("EventId") diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData.cs b/DD.Persistence.Database/Entity/ParameterData.cs similarity index 73% rename from DD.Persistence.Database/Entity/ParameterData/ParameterData.cs rename to DD.Persistence.Database/Entity/ParameterData.cs index 5ffce59..b7f3c62 100644 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData.cs +++ b/DD.Persistence.Database/Entity/ParameterData.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace DD.Persistence.Database.Entity.ParameterData; +namespace DD.Persistence.Database.Entity; [Table("ParameterData")] [PrimaryKey(nameof(DiscriminatorId), nameof(ParameterId), nameof(Timestamp))] @@ -14,8 +14,8 @@ public class ParameterData [Comment("Id параметра")] public int ParameterId { get; set; } - [Column(TypeName = "varchar(256)"), Comment("Значение параметра в виде строки")] - public string Value { get; set; } + [Column(TypeName = "jsonb"), Comment("Значение параметра")] + public required object Value { get; set; } [Comment("Временная отметка")] public DateTimeOffset Timestamp { get; set; } diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData1.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData1.cs deleted file mode 100644 index c918c58..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData1.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData1")] -public class ParameterData1 : ParameterData -{ -} diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData10.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData10.cs deleted file mode 100644 index 7a6e757..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData10.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData10")] -public class ParameterData10 : ParameterData -{ -} diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData11.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData11.cs deleted file mode 100644 index ea4d567..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData11.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData11")] -public class ParameterData11 : ParameterData -{ -} diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData12.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData12.cs deleted file mode 100644 index f27fa57..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData12.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData12")] -public class ParameterData12 : ParameterData -{ -} diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData13.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData13.cs deleted file mode 100644 index de39497..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData13.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData13")] -public class ParameterData13 : ParameterData -{ -} diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData14.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData14.cs deleted file mode 100644 index 3588884..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData14.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData14")] -public class ParameterData14 : ParameterData -{ -} diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData15.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData15.cs deleted file mode 100644 index 7f7d96e..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData15.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData15")] -public class ParameterData15 : ParameterData -{ -} diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData16.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData16.cs deleted file mode 100644 index 8e3350a..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData16.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData16")] -public class ParameterData16 : ParameterData -{ -} diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData17.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData17.cs deleted file mode 100644 index 01759ba..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData17.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData17")] -public class ParameterData17 : ParameterData -{ -} diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData18.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData18.cs deleted file mode 100644 index 6da79b3..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData18.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData18")] -public class ParameterData18 : ParameterData -{ -} diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData19.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData19.cs deleted file mode 100644 index 5caa9c4..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData19.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData19")] -public class ParameterData19 : ParameterData -{ -} diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData2.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData2.cs deleted file mode 100644 index d698caf..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData2.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData2")] -public class ParameterData2 : ParameterData -{ -} diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData20.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData20.cs deleted file mode 100644 index 569d166..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData20.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData20")] -public class ParameterData20 : ParameterData -{ -} diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData21.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData21.cs deleted file mode 100644 index 61a21e2..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData21.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData21")] -public class ParameterData21 : ParameterData -{ -} diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData22.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData22.cs deleted file mode 100644 index b0b74f3..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData22.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData22")] -public class ParameterData22 : ParameterData -{ -} diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData23.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData23.cs deleted file mode 100644 index 1f26b2c..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData23.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData23")] -public class ParameterData23 : ParameterData -{ -} diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData24.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData24.cs deleted file mode 100644 index 514b93f..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData24.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData24")] -public class ParameterData24 : ParameterData -{ -} diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData25.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData25.cs deleted file mode 100644 index 47e873f..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData25.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData25")] -public class ParameterData25 : ParameterData -{ -} diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData3.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData3.cs deleted file mode 100644 index 4014e84..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData3.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData3")] -public class ParameterData3 : ParameterData -{ -} diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData4.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData4.cs deleted file mode 100644 index 8d0afc1..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData4.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData4")] -public class ParameterData4 : ParameterData -{ -} diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData5.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData5.cs deleted file mode 100644 index 7647875..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData5.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData5")] -public class ParameterData5 : ParameterData -{ -} diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData6.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData6.cs deleted file mode 100644 index 7bcccb0..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData6.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData6")] -public class ParameterData6 : ParameterData -{ -} diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData7.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData7.cs deleted file mode 100644 index c007f8e..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData7.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData7")] -public class ParameterData7 : ParameterData -{ -} diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData8.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData8.cs deleted file mode 100644 index c022f8a..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData8.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData8")] -public class ParameterData8 : ParameterData -{ -} diff --git a/DD.Persistence.Database/Entity/ParameterData/ParameterData9.cs b/DD.Persistence.Database/Entity/ParameterData/ParameterData9.cs deleted file mode 100644 index 842d83b..0000000 --- a/DD.Persistence.Database/Entity/ParameterData/ParameterData9.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace DD.Persistence.Database.Entity.ParameterData; - -[Table("ParameterData9")] -public class ParameterData9 : ParameterData -{ -} diff --git a/DD.Persistence.Database/PersistenceDbContext.cs b/DD.Persistence.Database/PersistenceDbContext.cs index 0fe7a72..a91c332 100644 --- a/DD.Persistence.Database/PersistenceDbContext.cs +++ b/DD.Persistence.Database/PersistenceDbContext.cs @@ -1,7 +1,6 @@ using Microsoft.EntityFrameworkCore; using DD.Persistence.Database.Entity; using DD.Persistence.Database.Model; -using DD.Persistence.Database.Entity.ParameterData; namespace DD.Persistence.Database; @@ -21,32 +20,6 @@ public class PersistenceDbContext : DbContext public DbSet TechMessage => Set(); public DbSet ParameterData => Set(); - public DbSet ParameterData1 => Set(); - public DbSet ParameterData2 => Set(); - public DbSet ParameterData3 => Set(); - public DbSet ParameterData4 => Set(); - public DbSet ParameterData5 => Set(); - public DbSet ParameterData6 => Set(); - public DbSet ParameterData7 => Set(); - public DbSet ParameterData8 => Set(); - public DbSet ParameterData9 => Set(); - public DbSet ParameterData10 => Set(); - public DbSet ParameterData11 => Set(); - public DbSet ParameterData12 => Set(); - public DbSet ParameterData13 => Set(); - public DbSet ParameterData14 => Set(); - public DbSet ParameterData15 => Set(); - public DbSet ParameterData16 => Set(); - public DbSet ParameterData17 => Set(); - public DbSet ParameterData18 => Set(); - public DbSet ParameterData19 => Set(); - public DbSet ParameterData20 => Set(); - public DbSet ParameterData21 => Set(); - public DbSet ParameterData22 => Set(); - public DbSet ParameterData23 => Set(); - public DbSet ParameterData24 => Set(); - public DbSet ParameterData25 => Set(); - public DbSet DataSourceSystem => Set(); diff --git a/DD.Persistence.IntegrationTests/Controllers/WitsDataControllerTest.cs b/DD.Persistence.IntegrationTests/Controllers/WitsDataControllerTest.cs index 403ba33..e338539 100644 --- a/DD.Persistence.IntegrationTests/Controllers/WitsDataControllerTest.cs +++ b/DD.Persistence.IntegrationTests/Controllers/WitsDataControllerTest.cs @@ -4,7 +4,7 @@ using System.Net; using Xunit; using DD.Persistence.Client.Clients.Interfaces; using DD.Persistence.Client; -using DD.Persistence.Database.Entity.ParameterData; +using DD.Persistence.Database.Entity; namespace DD.Persistence.IntegrationTests.Controllers; public class WitsDataControllerTest : BaseIntegrationTest diff --git a/DD.Persistence.Repository/Repositories/ParameterRepository.cs b/DD.Persistence.Repository/Repositories/ParameterRepository.cs index 3466b92..c7c9caf 100644 --- a/DD.Persistence.Repository/Repositories/ParameterRepository.cs +++ b/DD.Persistence.Repository/Repositories/ParameterRepository.cs @@ -2,7 +2,7 @@ using Microsoft.EntityFrameworkCore; using DD.Persistence.Models; using DD.Persistence.Repositories; -using DD.Persistence.Database.Entity.ParameterData; +using DD.Persistence.Database.Entity; namespace DD.Persistence.Repository.Repositories; public class ParameterRepository : IParameterRepository diff --git a/DD.Persistence.sln b/DD.Persistence.sln index 872ec0a..4d79c88 100644 --- a/DD.Persistence.sln +++ b/DD.Persistence.sln @@ -18,7 +18,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DD.Persistence.Client", "DD EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DD.Persistence.App", "DD.Persistence.App\DD.Persistence.App.csproj", "{063238BF-E982-43FA-9DDB-7D7D279086D8}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Persistence.Benchmark", "Persistence.Benchmark\Persistence.Benchmark.csproj", "{27455F8C-6986-46F1-AD3E-B9D0C7AC85D1}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DD.Persistence.Benchmark", "DD.Persistence.Benchmark\DD.Persistence.Benchmark.csproj", "{89975A38-C78B-4464-A04D-D63E8745062D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -58,10 +58,10 @@ Global {063238BF-E982-43FA-9DDB-7D7D279086D8}.Debug|Any CPU.Build.0 = Debug|Any CPU {063238BF-E982-43FA-9DDB-7D7D279086D8}.Release|Any CPU.ActiveCfg = Release|Any CPU {063238BF-E982-43FA-9DDB-7D7D279086D8}.Release|Any CPU.Build.0 = Release|Any CPU - {27455F8C-6986-46F1-AD3E-B9D0C7AC85D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {27455F8C-6986-46F1-AD3E-B9D0C7AC85D1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {27455F8C-6986-46F1-AD3E-B9D0C7AC85D1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {27455F8C-6986-46F1-AD3E-B9D0C7AC85D1}.Release|Any CPU.Build.0 = Release|Any CPU + {89975A38-C78B-4464-A04D-D63E8745062D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {89975A38-C78B-4464-A04D-D63E8745062D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {89975A38-C78B-4464-A04D-D63E8745062D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {89975A38-C78B-4464-A04D-D63E8745062D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE