public Task DeleteItemAsync(TodoItem item) { return(Data.DeleteAsync <TodoItem>(item.ID.ToString(), DefaultPartitions.AppDocuments)); }
public async Task <List <TodoItem> > GetItemsNotDoneAsync() { var result = await Data.ListAsync <TodoItem>(DefaultPartitions.AppDocuments); return(result.Select(r => r.DeserializedValue).Where(item => !item.Done).ToList()); }
public async Task <TodoItem> GetItemAsync(Guid id) { var item = await Data.ReadAsync <TodoItem>(id.ToString(), DefaultPartitions.AppDocuments); return(item.DeserializedValue); }
public async Task <List <TodoItem> > GetItemsAsync() { var result = await Data.ListAsync <TodoItem>(DefaultPartitions.UserDocuments); return(result.Select(r => r.DeserializedValue).ToList()); }