From a0165f3c17a0769833da4cdfc73d7d83c6509a34 Mon Sep 17 00:00:00 2001 From: gg12 darfren Date: Tue, 5 Mar 2024 12:45:28 +0400 Subject: [PATCH 1/2] =?UTF-8?q?=D0=A1=D0=B4=D0=B0=D0=BD=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IceCreamShop/IceCreamShop.sln | 5 ++++- .../Implements/IceCreamStorage.cs | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/IceCreamShop/IceCreamShop.sln b/IceCreamShop/IceCreamShop.sln index 0bb6839..e0b065d 100644 --- a/IceCreamShop/IceCreamShop.sln +++ b/IceCreamShop/IceCreamShop.sln @@ -4,6 +4,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 VisualStudioVersion = 17.8.34309.116 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IceCreamShop", "IceCreamShop\IceCreamShop.csproj", "{CD111C92-FD71-4F7E-A7E7-03C273B634E6}" + ProjectSection(ProjectDependencies) = postProject + {CAF716C0-0F6F-43C2-B6F6-903AA9D96FC5} = {CAF716C0-0F6F-43C2-B6F6-903AA9D96FC5} + EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IceCreamShopDataModels", "IceCreamShopDataModels\IceCreamShopDataModels.csproj", "{0979632B-BB70-441E-9109-C52DBA5A85B2}" EndProject @@ -15,7 +18,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IceCreamShopListImplement", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IceCreamShopFileImplement", "IceCreamShopFileImplement\IceCreamShopFileImplement.csproj", "{A689B62C-67DF-47D8-B265-6C453D1055DA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IceCreamShopDatabaseImplement", "IceCreamShopDatabaseImplement\IceCreamShopDatabaseImplement.csproj", "{CAF716C0-0F6F-43C2-B6F6-903AA9D96FC5}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IceCreamShopDatabaseImplement", "IceCreamShopDatabaseImplement\IceCreamShopDatabaseImplement.csproj", "{CAF716C0-0F6F-43C2-B6F6-903AA9D96FC5}" ProjectSection(ProjectDependencies) = postProject {0979632B-BB70-441E-9109-C52DBA5A85B2} = {0979632B-BB70-441E-9109-C52DBA5A85B2} {8D344A7A-951D-496B-BC8A-DF18A06B1DF0} = {8D344A7A-951D-496B-BC8A-DF18A06B1DF0} diff --git a/IceCreamShop/IceCreamShopDatabaseImplement/Implements/IceCreamStorage.cs b/IceCreamShop/IceCreamShopDatabaseImplement/Implements/IceCreamStorage.cs index 904cc18..ce66090 100644 --- a/IceCreamShop/IceCreamShopDatabaseImplement/Implements/IceCreamStorage.cs +++ b/IceCreamShop/IceCreamShopDatabaseImplement/Implements/IceCreamStorage.cs @@ -58,14 +58,14 @@ namespace IceCreamShopDatabaseImplement.Implements public IceCreamViewModel? Insert(IceCreamBindingModel model) { using var context = new IceCreamShopDataBase(); - var newProduct = IceCream.Create(context, model); - if (newProduct == null) + var newIceCream = IceCream.Create(context, model); + if (newIceCream == null) { return null; } - context.IceCreams.Add(newProduct); + context.IceCreams.Add(newIceCream); context.SaveChanges(); - return newProduct.GetViewModel; + return newIceCream.GetViewModel; } public IceCreamViewModel? Update(IceCreamBindingModel model) { From 0ef1212a8ad7f7f809a38c4a831a2d66aae17115 Mon Sep 17 00:00:00 2001 From: gg12 darfren Date: Tue, 5 Mar 2024 13:14:25 +0400 Subject: [PATCH 2/2] =?UTF-8?q?=D0=AF=20=D0=BD=D0=B5=20=D0=B7=D0=BD=D0=B0?= =?UTF-8?q?=D1=8E=20=D0=BA=D0=B0=D0=BA=20=D1=8D=D1=82=D0=BE=20=D0=BF=D1=80?= =?UTF-8?q?=D0=BE=D0=B8=D0=B7=D0=BE=D1=88=D0=BB=D0=BE=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IceCreamShop/ClassLibrary1/Class1.cs | 7 ------- IceCreamShop/ClassLibrary1/ClassLibrary1.csproj | 9 --------- 2 files changed, 16 deletions(-) delete mode 100644 IceCreamShop/ClassLibrary1/Class1.cs delete mode 100644 IceCreamShop/ClassLibrary1/ClassLibrary1.csproj diff --git a/IceCreamShop/ClassLibrary1/Class1.cs b/IceCreamShop/ClassLibrary1/Class1.cs deleted file mode 100644 index ca3cd76..0000000 --- a/IceCreamShop/ClassLibrary1/Class1.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace ClassLibrary1 -{ - public class Class1 - { - - } -} diff --git a/IceCreamShop/ClassLibrary1/ClassLibrary1.csproj b/IceCreamShop/ClassLibrary1/ClassLibrary1.csproj deleted file mode 100644 index fa71b7a..0000000 --- a/IceCreamShop/ClassLibrary1/ClassLibrary1.csproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - net8.0 - enable - enable - - -