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; } } }