From 8da9d8b59c3e0e647e2822e7aa97a976eada2113 Mon Sep 17 00:00:00 2001 From: "ns.potapov" Date: Sun, 5 May 2024 14:34:26 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D1=84=D1=83=D0=BD?= =?UTF-8?q?=D0=BA=D1=86=D0=B8=D0=B8=20=D1=81=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=BF=D0=B8=D1=81=D1=8C=D0=BC=D0=B0=20=D0=B2=20?= =?UTF-8?q?=D1=80=D0=B5=D0=B0=D0=BB=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D0=B8=20?= =?UTF-8?q?=D1=85=D1=80=D0=B0=D0=BD=D0=B8=D0=BB=D0=B8=D1=89=D0=BF=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20=D1=81=D0=BF=D0=B8=D1=81=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Implements/MessageInfoStorage.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/SecuritySystem/SecuritySystemListImplement/Implements/MessageInfoStorage.cs b/SecuritySystem/SecuritySystemListImplement/Implements/MessageInfoStorage.cs index 2f68309..7b7a253 100644 --- a/SecuritySystem/SecuritySystemListImplement/Implements/MessageInfoStorage.cs +++ b/SecuritySystem/SecuritySystemListImplement/Implements/MessageInfoStorage.cs @@ -2,6 +2,7 @@ using SecuritySystemContracts.SearchModels; using SecuritySystemContracts.StoragesContracts; using SecuritySystemContracts.ViewModels; +using SecuritySystemListImplement.Models; namespace SecuritySystemListImplement.Implements { @@ -39,7 +40,13 @@ namespace SecuritySystemListImplement.Implements public MessageInfoViewModel? Insert(MessageInfoBindingModel model) { - throw new NotImplementedException(); + var messageInfo = MessageInfo.Create(model); + if (messageInfo == null) + { + return null; + } + _source.MessageInfos.Add(messageInfo); + return messageInfo.GetViewModel; } } }