PIbd-23 Dyakonov R R Hard Lab work 3 #8

Closed
dyakonovr wants to merge 5 commits from lab3_hard into lab2_hard
Showing only changes of commit be0690f470 - Show all commits

View File

@ -95,20 +95,5 @@ namespace SoftwareInstallationDatabaseImplement.Implements
return order.GetViewModel;
}
private static OrderViewModel GetPackageName(OrderViewModel viewModel)
{
using var context = new SoftwareInstallationDatabase();
var package = context.Packages.FirstOrDefault(x => x.Id == viewModel.PackageId);
if (package == null)
{
return viewModel;
}
viewModel.PackageName = package.PackageName;
return viewModel;
}
}
}