From f6f89d9cfe9036df29d363fd4e293d8a5cc72e20 Mon Sep 17 00:00:00 2001 From: Sergey Kozyrev Date: Tue, 30 Apr 2024 18:08:28 +0400 Subject: [PATCH] TESTFORSTORAGESEND --- .../Implements/ProductionStorage.cs | 2 +- Course/TestingDatabase/Program.cs | 13 ++----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/Course/DatabaseImplement/Implements/ProductionStorage.cs b/Course/DatabaseImplement/Implements/ProductionStorage.cs index fb1ab2f..901fdbb 100644 --- a/Course/DatabaseImplement/Implements/ProductionStorage.cs +++ b/Course/DatabaseImplement/Implements/ProductionStorage.cs @@ -34,7 +34,7 @@ namespace DatabaseImplement.Implements return new(); } using var context = new FactoryGoWorkDatabase(); - return context.Productions.Include(x => x.Details).ThenInclude(x => x.Detail).Where(x => x.UserId == model.Id).Select(x => x.GetViewModel).ToList(); + return context.Productions.Include(x => x.Details).ThenInclude(x => x.Detail).Where(x => x.UserId == model.UserId).Select(x => x.GetViewModel).ToList(); } public List GetFullList() diff --git a/Course/TestingDatabase/Program.cs b/Course/TestingDatabase/Program.cs index bd22dc9..45e0f61 100644 --- a/Course/TestingDatabase/Program.cs +++ b/Course/TestingDatabase/Program.cs @@ -12,14 +12,5 @@ DetailStorage detailStorage = new DetailStorage(); ImplementerStorage implementationStorage = new ImplementerStorage(); ProductionStorage productionionStorage = new ProductionStorage(); ProductStorage productStorage = new ProductStorage(); - -productionionStorage.Insert(new() -{ - UserId = 1, - Name = "Test", - Cost = 1, - ProductionDetails = new() - { - {2, detailStorage.GetElement(new() { Id = 2,}) }, {3, detailStorage.GetElement(new() {Id = 3})} - } -}); \ No newline at end of file +MachineStorage machineStorage = new MachineStorage(); +GuarantorStorage guarantorStorage = new GuarantorStorage();