diff --git a/Secure/SecureShopClientApp/appsettings.json b/Secure/SecureShopClientApp/appsettings.json
index 64e07df..c665091 100644
--- a/Secure/SecureShopClientApp/appsettings.json
+++ b/Secure/SecureShopClientApp/appsettings.json
@@ -6,5 +6,5 @@
}
},
"AllowedHosts": "*",
- "IPAddress": "http://localhost:5195"
+ "IPAddress": "https://localhost:7028"
}
diff --git a/Secure/SecureShopDatabaseImplement/Migrations/20230518085919_lll2.Designer.cs b/Secure/SecureShopDatabaseImplement/Migrations/20230518085919_lll2.Designer.cs
new file mode 100644
index 0000000..3c7bed4
--- /dev/null
+++ b/Secure/SecureShopDatabaseImplement/Migrations/20230518085919_lll2.Designer.cs
@@ -0,0 +1,257 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using SecureShopDatabaseImplement;
+
+#nullable disable
+
+namespace SecureShopDatabaseImplement.Migrations
+{
+ [DbContext(typeof(SecureShopDatabase))]
+ [Migration("20230518085919_lll2")]
+ partial class lll2
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "7.0.5")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("SecureShopDatabaseImplement.Models.Client", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("ClientFIO")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Email")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Password")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.ToTable("Clients");
+ });
+
+ modelBuilder.Entity("SecureShopDatabaseImplement.Models.Facilities", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("Cost")
+ .HasColumnType("float");
+
+ b.Property("FacilitiesName")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.ToTable("Facilitiess");
+ });
+
+ modelBuilder.Entity("SecureShopDatabaseImplement.Models.Implementer", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("ImplementerFIO")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Password")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Qualification")
+ .HasColumnType("int");
+
+ b.Property("WorkExperience")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("Implementers");
+ });
+
+ modelBuilder.Entity("SecureShopDatabaseImplement.Models.Order", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("ClientId")
+ .HasColumnType("int");
+
+ b.Property("Count")
+ .HasColumnType("int");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateImplement")
+ .HasColumnType("datetime2");
+
+ b.Property("ImplementerId")
+ .HasColumnType("int");
+
+ b.Property("SecureId")
+ .HasColumnType("int");
+
+ b.Property("Status")
+ .HasColumnType("int");
+
+ b.Property("Sum")
+ .HasColumnType("float");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ClientId");
+
+ b.HasIndex("ImplementerId");
+
+ b.HasIndex("SecureId");
+
+ b.ToTable("Orders");
+ });
+
+ modelBuilder.Entity("SecureShopDatabaseImplement.Models.Secure", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("Price")
+ .HasColumnType("float");
+
+ b.Property("SecureName")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.ToTable("Secures");
+ });
+
+ modelBuilder.Entity("SecureShopDatabaseImplement.Models.SecureFacilities", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("Count")
+ .HasColumnType("int");
+
+ b.Property("FacilitiesId")
+ .HasColumnType("int");
+
+ b.Property("SecureId")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("FacilitiesId");
+
+ b.HasIndex("SecureId");
+
+ b.ToTable("SecureFacilitiess");
+ });
+
+ modelBuilder.Entity("SecureShopDatabaseImplement.Models.Order", b =>
+ {
+ b.HasOne("SecureShopDatabaseImplement.Models.Client", "Client")
+ .WithMany("Orders")
+ .HasForeignKey("ClientId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("SecureShopDatabaseImplement.Models.Implementer", "Implementer")
+ .WithMany("Orders")
+ .HasForeignKey("ImplementerId");
+
+ b.HasOne("SecureShopDatabaseImplement.Models.Secure", "Secure")
+ .WithMany("Orders")
+ .HasForeignKey("SecureId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Client");
+
+ b.Navigation("Implementer");
+
+ b.Navigation("Secure");
+ });
+
+ modelBuilder.Entity("SecureShopDatabaseImplement.Models.SecureFacilities", b =>
+ {
+ b.HasOne("SecureShopDatabaseImplement.Models.Facilities", "Facilities")
+ .WithMany("SecureFacilitiess")
+ .HasForeignKey("FacilitiesId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("SecureShopDatabaseImplement.Models.Secure", "Secure")
+ .WithMany("Facilitiess")
+ .HasForeignKey("SecureId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Facilities");
+
+ b.Navigation("Secure");
+ });
+
+ modelBuilder.Entity("SecureShopDatabaseImplement.Models.Client", b =>
+ {
+ b.Navigation("Orders");
+ });
+
+ modelBuilder.Entity("SecureShopDatabaseImplement.Models.Facilities", b =>
+ {
+ b.Navigation("SecureFacilitiess");
+ });
+
+ modelBuilder.Entity("SecureShopDatabaseImplement.Models.Implementer", b =>
+ {
+ b.Navigation("Orders");
+ });
+
+ modelBuilder.Entity("SecureShopDatabaseImplement.Models.Secure", b =>
+ {
+ b.Navigation("Facilitiess");
+
+ b.Navigation("Orders");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/Secure/SecureShopDatabaseImplement/Migrations/20230518085919_lll2.cs b/Secure/SecureShopDatabaseImplement/Migrations/20230518085919_lll2.cs
new file mode 100644
index 0000000..e5d32f5
--- /dev/null
+++ b/Secure/SecureShopDatabaseImplement/Migrations/20230518085919_lll2.cs
@@ -0,0 +1,59 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace SecureShopDatabaseImplement.Migrations
+{
+ ///
+ public partial class lll2 : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropForeignKey(
+ name: "FK_Orders_Implementers_ImplementerId",
+ table: "Orders");
+
+ migrationBuilder.AlterColumn(
+ name: "ImplementerId",
+ table: "Orders",
+ type: "int",
+ nullable: true,
+ oldClrType: typeof(int),
+ oldType: "int");
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_Orders_Implementers_ImplementerId",
+ table: "Orders",
+ column: "ImplementerId",
+ principalTable: "Implementers",
+ principalColumn: "Id");
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropForeignKey(
+ name: "FK_Orders_Implementers_ImplementerId",
+ table: "Orders");
+
+ migrationBuilder.AlterColumn(
+ name: "ImplementerId",
+ table: "Orders",
+ type: "int",
+ nullable: false,
+ defaultValue: 0,
+ oldClrType: typeof(int),
+ oldType: "int",
+ oldNullable: true);
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_Orders_Implementers_ImplementerId",
+ table: "Orders",
+ column: "ImplementerId",
+ principalTable: "Implementers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ }
+ }
+}
diff --git a/Secure/SecureShopDatabaseImplement/Migrations/SecureShopDatabaseModelSnapshot.cs b/Secure/SecureShopDatabaseImplement/Migrations/SecureShopDatabaseModelSnapshot.cs
index 0e0efe3..9d5a0c8 100644
--- a/Secure/SecureShopDatabaseImplement/Migrations/SecureShopDatabaseModelSnapshot.cs
+++ b/Secure/SecureShopDatabaseImplement/Migrations/SecureShopDatabaseModelSnapshot.cs
@@ -115,7 +115,6 @@ namespace SecureShopDatabaseImplement.Migrations
.HasColumnType("datetime2");
b.Property("ImplementerId")
- .IsRequired()
.HasColumnType("int");
b.Property("SecureId")
@@ -194,9 +193,7 @@ namespace SecureShopDatabaseImplement.Migrations
b.HasOne("SecureShopDatabaseImplement.Models.Implementer", "Implementer")
.WithMany("Orders")
- .HasForeignKey("ImplementerId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
+ .HasForeignKey("ImplementerId");
b.HasOne("SecureShopDatabaseImplement.Models.Secure", "Secure")
.WithMany("Orders")
diff --git a/Secure/SecureShopDatabaseImplement/Models/Order.cs b/Secure/SecureShopDatabaseImplement/Models/Order.cs
index 9a39040..49ffbd4 100644
--- a/Secure/SecureShopDatabaseImplement/Models/Order.cs
+++ b/Secure/SecureShopDatabaseImplement/Models/Order.cs
@@ -14,7 +14,6 @@ namespace SecureShopDatabaseImplement.Models
public int SecureId { get; set; }
[Required]
public int ClientId { get; set; }
- [Required]
public int? ImplementerId { get; set; }
[Required]
public int Count { get; set; }