TESTFORSTORAGESEND

This commit is contained in:
Sergey Kozyrev 2024-04-30 18:08:28 +04:00
parent 6da52a2500
commit f6f89d9cfe
2 changed files with 3 additions and 12 deletions

View File

@ -34,7 +34,7 @@ namespace DatabaseImplement.Implements
return new(); return new();
} }
using var context = new FactoryGoWorkDatabase(); 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<ProductionViewModel> GetFullList() public List<ProductionViewModel> GetFullList()

View File

@ -12,14 +12,5 @@ DetailStorage detailStorage = new DetailStorage();
ImplementerStorage implementationStorage = new ImplementerStorage(); ImplementerStorage implementationStorage = new ImplementerStorage();
ProductionStorage productionionStorage = new ProductionStorage(); ProductionStorage productionionStorage = new ProductionStorage();
ProductStorage productStorage = new ProductStorage(); ProductStorage productStorage = new ProductStorage();
MachineStorage machineStorage = new MachineStorage();
productionionStorage.Insert(new() GuarantorStorage guarantorStorage = new GuarantorStorage();
{
UserId = 1,
Name = "Test",
Cost = 1,
ProductionDetails = new()
{
{2, detailStorage.GetElement(new() { Id = 2,}) }, {3, detailStorage.GetElement(new() {Id = 3})}
}
});