public async void DeleteObject(NoteObject note) { if (note == null) { return; } try { var item = _store.Retrieve(NotesSoup, _store.LookupSoupEntryId(NotesSoup, Constants.Id, note.ObjectId))[0].ToObject <JObject>(); item[SyncManager.Local] = true; item[SyncManager.LocallyDeleted] = true; _store.Upsert(NotesSoup, item); note.Deleted = true; await UpdateNote(note); } catch (Exception) { Debug.WriteLine("Exception occurred while trying to delete"); } }
public async void DeleteObject(ContactObject contact) { if (contact == null) { return; } try { var item = _store.Retrieve(ContactSoup, _store.LookupSoupEntryId(ContactSoup, Constants.Id, contact.ObjectId))[0].ToObject <JObject>(); item[SyncManager.Local] = true; item[SyncManager.LocallyDeleted] = true; _store.Upsert(ContactSoup, item); contact.Deleted = true; await UpdateContact(contact); } catch (Exception) { Debug.WriteLine("Exception occurred while trying to delete"); } }