public async Task <bool> SaveEntryAsync(EntryModel entryModel, ContentModel contentModel) { try { var json = JsonConvert.SerializeObject(contentModel); var pw = _passwordService.GetPassword(); if (pw == null) { return(false); } var encrypted = _encryptionService.Encrypt(json, pw); entryModel.Content = encrypted; entryModel.ContentType = contentModel.GetContentType(); return(await _entryRepository.SaveAsync(entryModel)); } catch (Exception e) { LogHelper.Instance.LogException(e, this); return(false); } }