last lab2

This commit is contained in:
revengel66 2024-03-26 23:16:58 +04:00
parent b74504a17d
commit 86eb33f1eb
11 changed files with 7 additions and 12 deletions

View File

@ -13,7 +13,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PizzeriaListImplement", "Pi
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PizzeriaBusinessLogic", "PizzeriaBusinessLogic\PizzeriaBusinessLogic.csproj", "{16EC5652-8348-4520-9736-1889B2749416}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PizzeriaFileImplement", "AbstractShopFileImplement\PizzeriaFileImplement.csproj", "{87ACB324-2C2F-48B1-A945-0F348CCA8F69}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PizzeriaFileImplement", "PizzeriaFileImplement\PizzeriaFileImplement.csproj", "{5FA9C75E-4A06-4B3E-AD87-48B0C96BB4A1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -41,10 +41,10 @@ Global
{16EC5652-8348-4520-9736-1889B2749416}.Debug|Any CPU.Build.0 = Debug|Any CPU
{16EC5652-8348-4520-9736-1889B2749416}.Release|Any CPU.ActiveCfg = Release|Any CPU
{16EC5652-8348-4520-9736-1889B2749416}.Release|Any CPU.Build.0 = Release|Any CPU
{87ACB324-2C2F-48B1-A945-0F348CCA8F69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{87ACB324-2C2F-48B1-A945-0F348CCA8F69}.Debug|Any CPU.Build.0 = Debug|Any CPU
{87ACB324-2C2F-48B1-A945-0F348CCA8F69}.Release|Any CPU.ActiveCfg = Release|Any CPU
{87ACB324-2C2F-48B1-A945-0F348CCA8F69}.Release|Any CPU.Build.0 = Release|Any CPU
{5FA9C75E-4A06-4B3E-AD87-48B0C96BB4A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5FA9C75E-4A06-4B3E-AD87-48B0C96BB4A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5FA9C75E-4A06-4B3E-AD87-48B0C96BB4A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5FA9C75E-4A06-4B3E-AD87-48B0C96BB4A1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -26,9 +26,9 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AbstractShopFileImplement\PizzeriaFileImplement.csproj" />
<ProjectReference Include="..\PizzeriaBusinessLogic\PizzeriaBusinessLogic.csproj" />
<ProjectReference Include="..\PizzeriaContracts\PizzeriaContracts.csproj" />
<ProjectReference Include="..\PizzeriaFileImplement\PizzeriaFileImplement.csproj" />
<ProjectReference Include="..\PizzeriaListImplement\PizzeriaListImplement.csproj" />
</ItemGroup>

View File

@ -1,10 +1,10 @@
using Microsoft.Extensions.DependencyInjection;
using PizzeriaContracts.BusinessLogicsContracts;
using PizzeriaContracts.StorageContracts;
using PizzeriaFileImplement.Implements;
using PizzeriaBusinessLogic.BusinessLogic;
using Microsoft.Extensions.Logging;
using NLog.Extensions.Logging;
using PizzeriaFileImplement.Implements;
namespace Pizzeria
{

View File

@ -79,11 +79,6 @@ namespace PizzeriaFileImplement.Implements
private OrderViewModel AddPizzaName(OrderViewModel model)
{
var selectedPizza = source.Pizzas.FirstOrDefault(x => x.Id == model.PizzaId);
if (selectedPizza != null)
{
model.PizzaName = selectedPizza.PizzaName;
}
model.PizzaName = selectedPizza?.PizzaName;
return model;
}