From c66fb801969ea871bd676ad85bf88a8ad2ff3b52 Mon Sep 17 00:00:00 2001 From: maxnes3 <112558334+maxnes3@users.noreply.github.com> Date: Tue, 2 May 2023 23:19:34 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=81=D1=82=D0=B0=D0=BB=D0=BE=D1=81?= =?UTF-8?q?=D1=8C=20=D0=BF=D1=80=D0=B8=D0=B2=D1=8F=D0=B7=D0=B0=D1=82=D1=8C?= =?UTF-8?q?=20=D0=BA=20=D0=B2=D0=B8=D1=80=D1=83=D0=B0=D0=BB=D0=BA=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Implements/DealStorage.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PersonnelDepartmentView/PersonnelDepartmentDatabaseImplement/Implements/DealStorage.cs b/PersonnelDepartmentView/PersonnelDepartmentDatabaseImplement/Implements/DealStorage.cs index 0c19260..7892d0d 100644 --- a/PersonnelDepartmentView/PersonnelDepartmentDatabaseImplement/Implements/DealStorage.cs +++ b/PersonnelDepartmentView/PersonnelDepartmentDatabaseImplement/Implements/DealStorage.cs @@ -93,7 +93,7 @@ namespace PersonnelDepartmentDatabaseImplement.Implements using var context = new PersonnelDepartmentDatabase(); context.Deals.Add(newElement); context.SaveChanges(); - return newElement.GetViewModel; + return GetElement(new DealSearchModel { Id = newElement.Id } ); } public DealViewModel? Update(DealBindingModel model) @@ -111,7 +111,7 @@ namespace PersonnelDepartmentDatabaseImplement.Implements } element.Update(model); context.SaveChanges(); - return element.GetViewModel; + return GetElement(new DealSearchModel { Id = element.Id }); } } }