public Task <IKeyValueEntry> PushKeyValueEntryAsync(IKeyValueEntry keyValueEntry)
        {
            NullGuard.NotNull(keyValueEntry, nameof(keyValueEntry));

            return(ExecuteAsync(async() =>
            {
                using KeyValueEntryModelHandler keyValueEntryModelHandler = new KeyValueEntryModelHandler(DbContext, CommonModelConverter.Create());
                return await keyValueEntryModelHandler.PushAsync(keyValueEntry);
            },
                                MethodBase.GetCurrentMethod()));
        }
 public Task <ILetterHead> DeleteLetterHeadAsync(int number)
 {
     return(ExecuteAsync(async() =>
     {
         using LetterHeadModelHandler letterHeadModelHandler = new LetterHeadModelHandler(DbContext, CommonModelConverter.Create());
         return await letterHeadModelHandler.DeleteAsync(number);
     },
                         MethodBase.GetCurrentMethod()));
 }
 public Task <IEnumerable <ILetterHead> > GetLetterHeadsAsync()
 {
     return(ExecuteAsync(async() =>
     {
         using LetterHeadModelHandler letterHeadModelHandler = new LetterHeadModelHandler(DbContext, CommonModelConverter.Create());
         return await letterHeadModelHandler.ReadAsync();
     },
                         MethodBase.GetCurrentMethod()));
 }
        public Task <ILetterHead> UpdateLetterHeadAsync(ILetterHead letterHead)
        {
            NullGuard.NotNull(letterHead, nameof(letterHead));

            return(ExecuteAsync(async() =>
            {
                using LetterHeadModelHandler letterHeadModelHandler = new LetterHeadModelHandler(DbContext, CommonModelConverter.Create());
                return await letterHeadModelHandler.UpdateAsync(letterHead);
            },
                                MethodBase.GetCurrentMethod()));
        }
        public Task <IKeyValueEntry> DeleteKeyValueEntryAsync(string key)
        {
            NullGuard.NotNullOrWhiteSpace(key, nameof(key));

            return(ExecuteAsync(async() =>
            {
                using KeyValueEntryModelHandler keyValueEntryModelHandler = new KeyValueEntryModelHandler(DbContext, CommonModelConverter.Create());
                return await keyValueEntryModelHandler.DeleteAsync(key);
            },
                                MethodBase.GetCurrentMethod()));
        }