diff --git a/Course/Course.sln b/Course/Course.sln index ef82a78..385746f 100644 --- a/Course/Course.sln +++ b/Course/Course.sln @@ -13,7 +13,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DatabaseImplement", "Databa EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImplementerApp", "ImplementerApp\ImplementerApp.csproj", "{9CEB1DEF-2254-4745-89C9-832E2F857BF4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GuarantorAPP", "GuarantorAPP\GuarantorAPP.csproj", "{9B5881EA-1F06-422A-85F4-BDD188921374}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GuarantorAPP", "GuarantorAPP\GuarantorAPP.csproj", "{9B5881EA-1F06-422A-85F4-BDD188921374}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestingDatabase", "TestingDatabase\TestingDatabase.csproj", "{022506BE-1362-4426-9B66-168680BD4AA4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -45,6 +47,10 @@ Global {9B5881EA-1F06-422A-85F4-BDD188921374}.Debug|Any CPU.Build.0 = Debug|Any CPU {9B5881EA-1F06-422A-85F4-BDD188921374}.Release|Any CPU.ActiveCfg = Release|Any CPU {9B5881EA-1F06-422A-85F4-BDD188921374}.Release|Any CPU.Build.0 = Release|Any CPU + {022506BE-1362-4426-9B66-168680BD4AA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {022506BE-1362-4426-9B66-168680BD4AA4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {022506BE-1362-4426-9B66-168680BD4AA4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {022506BE-1362-4426-9B66-168680BD4AA4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Course/DatabaseImplement/Implements/DetailStorage.cs b/Course/DatabaseImplement/Implements/DetailStorage.cs index bfe1472..b93ec5b 100644 --- a/Course/DatabaseImplement/Implements/DetailStorage.cs +++ b/Course/DatabaseImplement/Implements/DetailStorage.cs @@ -27,23 +27,13 @@ namespace DatabaseImplement.Implements public List GetFilteredList(DetailSearchModel model) { - if (!model.Id.HasValue && string.IsNullOrEmpty(model.Name) && !model.UserId.HasValue) + if (!model.UserId.HasValue) { return new(); } using var context = new FactoryGoWorkDatabase(); - if (model.Id.HasValue) - { - return context.Details.Where(x => x.Id == model.Id).Select(x => x.GetViewModel).ToList(); - } - else if (model.UserId.HasValue) - { - return context.Details.Where(x => x.UserId == model.Id).Select(x => x.GetViewModel).ToList(); - } - else - { - return context.Details.Where(x => model.Name == x.Name).Select(x => x.GetViewModel).ToList(); - } + return context.Details.Where(x => x.UserId == model.Id).Select(x => x.GetViewModel).ToList(); + } public List GetFullList() diff --git a/Course/DatabaseImplement/Implements/ProductStorage.cs b/Course/DatabaseImplement/Implements/ProductStorage.cs index 4f835fa..0be01eb 100644 --- a/Course/DatabaseImplement/Implements/ProductStorage.cs +++ b/Course/DatabaseImplement/Implements/ProductStorage.cs @@ -3,6 +3,7 @@ using Contracts.SearchModels; using Contracts.StoragesContracts; using Contracts.ViewModels; using DatabaseImplement.Models; +using Microsoft.EntityFrameworkCore; namespace DatabaseImplement.Implements { @@ -14,6 +15,7 @@ namespace DatabaseImplement.Implements var newProduct = context.Products.FirstOrDefault(x => x.Id == model.Id); if (newProduct == null) return null; + newProduct.UpdateDetails(context, model); context.Products.Remove(newProduct); context.SaveChanges(); return newProduct.GetViewModel; @@ -22,34 +24,23 @@ namespace DatabaseImplement.Implements public ProductViewModel? GetElement(ProductSearchModel model) { using var context = new FactoryGoWorkDatabase(); - return context.Products.FirstOrDefault(x => (!string.IsNullOrEmpty(model.Name) && x.Name.Contains(model.Name)) || (model.Id.HasValue && x.Id == model.Id))?.GetViewModel; + return context.Products.Include(p => p.Details).ThenInclude(p => p.Detail).FirstOrDefault(x => (!string.IsNullOrEmpty(model.Name) && x.Name.Contains(model.Name)) || (model.Id.HasValue && x.Id == model.Id))?.GetViewModel; } public List GetFilteredList(ProductSearchModel model) { - if (!model.Id.HasValue && string.IsNullOrEmpty(model.Name) && !model.UserId.HasValue) + if (!model.UserId.HasValue) { return new(); } using var context = new FactoryGoWorkDatabase(); - if (model.Id.HasValue) - { - return context.Products.Where(x => x.Id == model.Id).Select(x => x.GetViewModel).ToList(); - } - else if (model.UserId.HasValue) - { - return context.Products.Where(x => x.UserId == model.Id).Select(x => x.GetViewModel).ToList(); - } - else - { - return context.Products.Where(x => model.Name == x.Name).Select(x => x.GetViewModel).ToList(); - } + return context.Products.Include(p => p.Details).ThenInclude(p => p.Detail).Where(x => x.UserId == model.Id).Select(x => x.GetViewModel).ToList(); } public List GetFullList() { using var context = new FactoryGoWorkDatabase(); - return context.Products.Select(x => x.GetViewModel).ToList(); + return context.Products.Include(p => p.Details).ThenInclude(p => p.Detail).Select(x => x.GetViewModel).ToList(); } public ProductViewModel? Insert(ProductBindingModel model) @@ -70,6 +61,7 @@ namespace DatabaseImplement.Implements if (newProduct == null) return null; newProduct.Update(model); + newProduct.UpdateDetails(context, model); context.SaveChanges(); return newProduct.GetViewModel; } diff --git a/Course/DatabaseImplement/Implements/ProductionStorage.cs b/Course/DatabaseImplement/Implements/ProductionStorage.cs index b5f0dcd..9c3dd90 100644 --- a/Course/DatabaseImplement/Implements/ProductionStorage.cs +++ b/Course/DatabaseImplement/Implements/ProductionStorage.cs @@ -3,6 +3,7 @@ using Contracts.SearchModels; using Contracts.StoragesContracts; using Contracts.ViewModels; using DatabaseImplement.Models; +using Microsoft.EntityFrameworkCore; namespace DatabaseImplement.Implements { @@ -22,34 +23,23 @@ namespace DatabaseImplement.Implements public ProductionViewModel? GetElement(ProductionSearchModel model) { using var context = new FactoryGoWorkDatabase(); - return context.Productions.FirstOrDefault(x => (!string.IsNullOrEmpty(model.Name) && x.Name.Contains(model.Name)) || (model.Id.HasValue && x.Id == model.Id))?.GetViewModel; + return context.Productions.Include(x => x.Details).ThenInclude(x => x.Detail).FirstOrDefault(x => (!string.IsNullOrEmpty(model.Name) && x.Name.Contains(model.Name)) || (model.Id.HasValue && x.Id == model.Id))?.GetViewModel; } public List GetFilteredList(ProductionSearchModel model) { - if (!model.Id.HasValue && string.IsNullOrEmpty(model.Name) && !model.UserId.HasValue) + if (!model.UserId.HasValue) { return new(); } using var context = new FactoryGoWorkDatabase(); - if (model.Id.HasValue) - { - return context.Productions.Where(x => x.Id == model.Id).Select(x => x.GetViewModel).ToList(); - } - else if (model.UserId.HasValue) - { - return context.Productions.Where(x => x.UserId == model.Id).Select(x => x.GetViewModel).ToList(); - } - else - { - return context.Productions.Where(x => model.Name == x.Name).Select(x => x.GetViewModel).ToList(); - } + return context.Productions.Include(x => x.Details).ThenInclude(x => x.Detail).Where(x => x.UserId == model.Id).Select(x => x.GetViewModel).ToList(); } public List GetFullList() { using var context = new FactoryGoWorkDatabase(); - return context.Productions.Select(x => x.GetViewModel).ToList(); + return context.Productions.Include(x => x.Details).ThenInclude(x => x.Detail).Select(x => x.GetViewModel).ToList(); } public ProductionViewModel? Insert(ProductionBindingModel model) diff --git a/Course/DatabaseImplement/Migrations/20240427200038_somestrange.Designer.cs b/Course/DatabaseImplement/Migrations/20240430122917_tryToCheck.Designer.cs similarity index 98% rename from Course/DatabaseImplement/Migrations/20240427200038_somestrange.Designer.cs rename to Course/DatabaseImplement/Migrations/20240430122917_tryToCheck.Designer.cs index 0d99a3d..3a465a1 100644 --- a/Course/DatabaseImplement/Migrations/20240427200038_somestrange.Designer.cs +++ b/Course/DatabaseImplement/Migrations/20240430122917_tryToCheck.Designer.cs @@ -12,8 +12,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace DatabaseImplement.Migrations { [DbContext(typeof(FactoryGoWorkDatabase))] - [Migration("20240427200038_somestrange")] - partial class somestrange + [Migration("20240430122917_tryToCheck")] + partial class tryToCheck { protected override void BuildTargetModel(ModelBuilder modelBuilder) { @@ -330,7 +330,6 @@ namespace DatabaseImplement.Migrations .HasColumnType("nvarchar(max)"); b.Property("ProductionId") - .IsRequired() .HasColumnType("int"); b.Property("Title") @@ -489,10 +488,8 @@ namespace DatabaseImplement.Migrations modelBuilder.Entity("DatabaseImplement.Models.Workshop", b => { b.HasOne("DatabaseImplement.Models.Production", "Production") - .WithMany() - .HasForeignKey("ProductionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + .WithMany("Workshops") + .HasForeignKey("ProductionId"); b.HasOne("DatabaseImplement.Models.Guarantor", "Guarantor") .WithMany("Workshops") @@ -543,6 +540,8 @@ namespace DatabaseImplement.Migrations modelBuilder.Entity("DatabaseImplement.Models.Production", b => { b.Navigation("Details"); + + b.Navigation("Workshops"); }); modelBuilder.Entity("DatabaseImplement.Models.Worker", b => diff --git a/Course/DatabaseImplement/Migrations/20240427200038_somestrange.cs b/Course/DatabaseImplement/Migrations/20240430122917_tryToCheck.cs similarity index 96% rename from Course/DatabaseImplement/Migrations/20240427200038_somestrange.cs rename to Course/DatabaseImplement/Migrations/20240430122917_tryToCheck.cs index 1d7d553..e6054f2 100644 --- a/Course/DatabaseImplement/Migrations/20240427200038_somestrange.cs +++ b/Course/DatabaseImplement/Migrations/20240430122917_tryToCheck.cs @@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Migrations; namespace DatabaseImplement.Migrations { - public partial class somestrange : Migration + public partial class tryToCheck : Migration { protected override void Up(MigrationBuilder migrationBuilder) { @@ -151,7 +151,8 @@ namespace DatabaseImplement.Migrations name: "FK_Products_Machines_MachineId", column: x => x.MachineId, principalTable: "Machines", - principalColumn: "Id"); + principalColumn: "Id", + onDelete: ReferentialAction.SetNull); }); migrationBuilder.CreateTable( @@ -171,13 +172,13 @@ namespace DatabaseImplement.Migrations column: x => x.WorkerId, principalTable: "Machines", principalColumn: "Id", - onDelete: ReferentialAction.NoAction); + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_WorkerMachines_Workers_WorkerId", column: x => x.WorkerId, principalTable: "Workers", principalColumn: "Id", - onDelete: ReferentialAction.NoAction); + onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( @@ -197,13 +198,13 @@ namespace DatabaseImplement.Migrations column: x => x.DetailId, principalTable: "Details", principalColumn: "Id", - onDelete: ReferentialAction.NoAction); + onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_DetailProductions_Productions_ProductionId", column: x => x.ProductionId, principalTable: "Productions", principalColumn: "Id", - onDelete: ReferentialAction.NoAction); + onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( @@ -216,7 +217,7 @@ namespace DatabaseImplement.Migrations Address = table.Column(type: "nvarchar(max)", nullable: false), Director = table.Column(type: "nvarchar(max)", nullable: false), UserId = table.Column(type: "int", nullable: false), - ProductionId = table.Column(type: "int", nullable: false) + ProductionId = table.Column(type: "int", nullable: true) }, constraints: table => { @@ -232,7 +233,7 @@ namespace DatabaseImplement.Migrations column: x => x.ProductionId, principalTable: "Productions", principalColumn: "Id", - onDelete: ReferentialAction.Cascade); + onDelete: ReferentialAction.SetNull); }); migrationBuilder.CreateTable( @@ -253,13 +254,13 @@ namespace DatabaseImplement.Migrations column: x => x.DetailId, principalTable: "Details", principalColumn: "Id", - onDelete: ReferentialAction.NoAction); + onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_DetailProducts_Products_ProductId", column: x => x.ProductId, principalTable: "Products", principalColumn: "Id", - onDelete: ReferentialAction.NoAction); + onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( @@ -279,13 +280,13 @@ namespace DatabaseImplement.Migrations column: x => x.WorkerId, principalTable: "Workers", principalColumn: "Id", - onDelete: ReferentialAction.NoAction); + onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_WorkerWorkshops_Workshops_WorkshopId", column: x => x.WorkshopId, principalTable: "Workshops", principalColumn: "Id", - onDelete: ReferentialAction.NoAction); + onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateIndex( diff --git a/Course/DatabaseImplement/Migrations/FactoryGoWorkDatabaseModelSnapshot.cs b/Course/DatabaseImplement/Migrations/FactoryGoWorkDatabaseModelSnapshot.cs index 1be806c..f409ead 100644 --- a/Course/DatabaseImplement/Migrations/FactoryGoWorkDatabaseModelSnapshot.cs +++ b/Course/DatabaseImplement/Migrations/FactoryGoWorkDatabaseModelSnapshot.cs @@ -328,7 +328,6 @@ namespace DatabaseImplement.Migrations .HasColumnType("nvarchar(max)"); b.Property("ProductionId") - .IsRequired() .HasColumnType("int"); b.Property("Title") @@ -487,10 +486,8 @@ namespace DatabaseImplement.Migrations modelBuilder.Entity("DatabaseImplement.Models.Workshop", b => { b.HasOne("DatabaseImplement.Models.Production", "Production") - .WithMany() - .HasForeignKey("ProductionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + .WithMany("Workshops") + .HasForeignKey("ProductionId"); b.HasOne("DatabaseImplement.Models.Guarantor", "Guarantor") .WithMany("Workshops") @@ -541,6 +538,8 @@ namespace DatabaseImplement.Migrations modelBuilder.Entity("DatabaseImplement.Models.Production", b => { b.Navigation("Details"); + + b.Navigation("Workshops"); }); modelBuilder.Entity("DatabaseImplement.Models.Worker", b => diff --git a/Course/DatabaseImplement/Models/Implementer.cs b/Course/DatabaseImplement/Models/Implementer.cs index 0dc064a..1cc346e 100644 --- a/Course/DatabaseImplement/Models/Implementer.cs +++ b/Course/DatabaseImplement/Models/Implementer.cs @@ -56,6 +56,7 @@ namespace DatabaseImplement.Models return; Email = model.Email; Name = model.Name; + Login = model.Login; Password = model.Password; } public ImplementerViewModel GetViewModel => new() diff --git a/Course/DatabaseImplement/Models/Product.cs b/Course/DatabaseImplement/Models/Product.cs index 9b31d2f..1543963 100644 --- a/Course/DatabaseImplement/Models/Product.cs +++ b/Course/DatabaseImplement/Models/Product.cs @@ -92,12 +92,15 @@ namespace DatabaseImplement.Models context.SaveChanges(); foreach (var upDetail in productDetails) { - upDetail.Count = model.ProductDetails[upDetail.DetailId].Item2; - model.ProductDetails.Remove(upDetail.DetailId); + if (model.ProductDetails.ContainsKey(upDetail.DetailId)) + { + upDetail.Count = model.ProductDetails[upDetail.DetailId].Item2; + model.ProductDetails.Remove(upDetail.DetailId); + } } context.SaveChanges(); } - var product = context.Products.First(x => x.Id == model.Id); + var product = context.Products.FirstOrDefault(x => x.Id == model.Id); foreach (var dp in model.ProductDetails) { context.DetailProducts.Add(new DetailProduct diff --git a/Course/DatabaseImplement/Models/Production.cs b/Course/DatabaseImplement/Models/Production.cs index e1d8074..6dccffe 100644 --- a/Course/DatabaseImplement/Models/Production.cs +++ b/Course/DatabaseImplement/Models/Production.cs @@ -31,8 +31,10 @@ namespace DatabaseImplement.Models } } [ForeignKey("ProductionId")] - public List Details { get; set; } = new(); + public virtual List Details { get; set; } = new(); public virtual Implementer User { get; set; } + [ForeignKey("ProductionId")] + public virtual List Workshops { get; set; } public static Production Create(FactoryGoWorkDatabase context, ProductionBindingModel model) { diff --git a/Course/DatabaseImplement/Models/Workshop.cs b/Course/DatabaseImplement/Models/Workshop.cs index 7a13aec..94c8178 100644 --- a/Course/DatabaseImplement/Models/Workshop.cs +++ b/Course/DatabaseImplement/Models/Workshop.cs @@ -17,7 +17,6 @@ namespace DatabaseImplement.Models public string Director { get; set; } = string.Empty; [Required] public int UserId { get; set; } - [Required] public int? ProductionId { get; set; } public virtual Production? Production { get; set; } private Dictionary? _workerWorkshops = null; diff --git a/Course/ImplementerApp/Controllers/HomeController.cs b/Course/ImplementerApp/Controllers/HomeController.cs index 9d2d9b0..6e00cd3 100644 --- a/Course/ImplementerApp/Controllers/HomeController.cs +++ b/Course/ImplementerApp/Controllers/HomeController.cs @@ -60,7 +60,26 @@ namespace ImplementerApp.Controllers public IActionResult IndexProduct() { - return View(new List()); + List products = new List + { + new ProductViewModel + { + Id = 1, + Name = "Изделие 1", + Cost = 10.99, + UserId = 1, + MachineId = 1 + }, + new ProductViewModel + { + Id = 2, + Name = "Изделие 2", + Cost = 19.99, + UserId = 2, + MachineId = 2 + } + }; + return View(products); } public IActionResult CreateProduct() { @@ -83,7 +102,24 @@ namespace ImplementerApp.Controllers } public IActionResult IndexProduction() { - return View(new List()); + List productionViewModels = new List + { + new ProductionViewModel + { + Id = 1, + Name = "Производство А", + Cost = 1000.00, + UserId = 1 + }, + new ProductionViewModel + { + Id = 2, + Name = "Производство Б", + Cost = 1500.00, + UserId = 2 + } + }; + return View(productionViewModels); } public IActionResult CreateProduction() { @@ -105,16 +141,53 @@ namespace ImplementerApp.Controllers return View(details); } public IActionResult Privacy() - { - return View(); + { + ImplementerViewModel user = new() + { + Email = "mail@mail.ru", + Login = "Login", + Password = "password", + Name = "User" + + }; + + return View(user); } public IActionResult DetailTimeReport() { - return View(new List()); + List detailTimeReports = new List + { + new DetailTimeReport + { + DetailName = "Деталь А", + Productions = new List { "Производство 1", "Производство 2" }, + Machines = new List { "Машина X", "Машина Y" } + }, + new DetailTimeReport + { + DetailName = "Деталь B", + Productions = new List { "Производство 3", "Производство 4" }, + Machines = new List { "Машина Z", "Машина W" } + } + }; + return View(detailTimeReports); } public IActionResult DetailWorkshopReport() { - return View(new List()); + List detailWorkshopReports = new List + { + new DetailWorkshopReportViewModel + { + DetailName = "Деталь X", + WorkShops = new List { "Цех 1", "Цех 2" } + }, + new DetailWorkshopReportViewModel + { + DetailName = "Деталь Y", + WorkShops = new List { "Цех 3", "Цех 4" } + } + }; + return View(detailWorkshopReports); } public IActionResult ReportsMenu() { diff --git a/Course/ImplementerApp/Views/Home/CreateProduct.cshtml b/Course/ImplementerApp/Views/Home/CreateProduct.cshtml index bb0a870..0033b22 100644 --- a/Course/ImplementerApp/Views/Home/CreateProduct.cshtml +++ b/Course/ImplementerApp/Views/Home/CreateProduct.cshtml @@ -14,13 +14,14 @@
-
Details
+
Детали
+ diff --git a/Course/ImplementerApp/Views/Home/CreateProduction.cshtml b/Course/ImplementerApp/Views/Home/CreateProduction.cshtml index fa8cd21..de8b108 100644 --- a/Course/ImplementerApp/Views/Home/CreateProduction.cshtml +++ b/Course/ImplementerApp/Views/Home/CreateProduction.cshtml @@ -21,7 +21,6 @@ - diff --git a/Course/ImplementerApp/Views/Home/IndexDetail.cshtml b/Course/ImplementerApp/Views/Home/IndexDetail.cshtml index f8a9c80..ac228d1 100644 --- a/Course/ImplementerApp/Views/Home/IndexDetail.cshtml +++ b/Course/ImplementerApp/Views/Home/IndexDetail.cshtml @@ -57,7 +57,7 @@ Изменить } diff --git a/Course/ImplementerApp/Views/Home/IndexProduct.cshtml b/Course/ImplementerApp/Views/Home/IndexProduct.cshtml index 2f1be6b..820b716 100644 --- a/Course/ImplementerApp/Views/Home/IndexProduct.cshtml +++ b/Course/ImplementerApp/Views/Home/IndexProduct.cshtml @@ -7,11 +7,10 @@ }
-

Изедлия

+

Изделия

-Привязать станок к изделию - +ProductMachineAdd
@{ if (Model == null) @@ -34,6 +33,9 @@
+ @@ -55,11 +57,14 @@ + } diff --git a/Course/ImplementerApp/Views/Home/Privacy.cshtml b/Course/ImplementerApp/Views/Home/Privacy.cshtml index af4fb19..dcde174 100644 --- a/Course/ImplementerApp/Views/Home/Privacy.cshtml +++ b/Course/ImplementerApp/Views/Home/Privacy.cshtml @@ -1,6 +1,28 @@ @{ ViewData["Title"] = "Privacy Policy"; } -

@ViewData["Title"]

- -

Use this page to detail your site's privacy policy.

+
+

Личные данные

+
+ +
+
Логин:
+
+
+
+
Почта:
+
+
+
+
Пароль:
+
+
+
+
ФИО:
+
+
+
+
+
+
+ \ No newline at end of file diff --git a/Course/ImplementerApp/Views/Shared/_Layout.cshtml b/Course/ImplementerApp/Views/Shared/_Layout.cshtml index bc0e541..ca5b590 100644 --- a/Course/ImplementerApp/Views/Shared/_Layout.cshtml +++ b/Course/ImplementerApp/Views/Shared/_Layout.cshtml @@ -12,7 +12,8 @@
diff --git a/Course/ImplementerApp/wwwroot/images/Work-transformed.png b/Course/ImplementerApp/wwwroot/images/Work-transformed.png new file mode 100644 index 0000000..1185fda Binary files /dev/null and b/Course/ImplementerApp/wwwroot/images/Work-transformed.png differ diff --git a/Course/TestingDatabase/Program.cs b/Course/TestingDatabase/Program.cs new file mode 100644 index 0000000..cd9d0a8 --- /dev/null +++ b/Course/TestingDatabase/Program.cs @@ -0,0 +1,17 @@ +using DatabaseImplement; +using DatabaseImplement.Implements; +using Contracts.BindingModels; +using Contracts.BusinessLogicsContracts; +using Contracts.SearchModels; +using Contracts.ViewModels; +using Microsoft.EntityFrameworkCore.Query.Internal; +using DatabaseImplement.Models; +using DataModels.Models; + +DetailStorage detailStorage = new DetailStorage(); +ImplementerStorage implementationStorage = new ImplementerStorage(); +ProductionionStorage productionionStorage = new ProductionionStorage(); +ProductStorage productStorage = new ProductStorage(); + +var i = productStorage.GetFullList(); +Console.WriteLine(i); \ No newline at end of file diff --git a/Course/TestingDatabase/TestingDatabase.csproj b/Course/TestingDatabase/TestingDatabase.csproj new file mode 100644 index 0000000..a1b3a65 --- /dev/null +++ b/Course/TestingDatabase/TestingDatabase.csproj @@ -0,0 +1,16 @@ + + + + Exe + net6.0 + enable + enable + + + + + + + + +
Выбор НазваниеКоличество
Выбор НазваниеКоличество
- Удалить + Удалить
Цена + Привязка станка к изделию + Изменить изделие @Html.DisplayFor(modelItem => item.Cost) + Привязать станок + Изменить - Удалить + Удалить