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();