Пример #1
0
 public Task DeleteItemAsync(TodoItem item)
 {
     return(Data.DeleteAsync <TodoItem>(item.ID.ToString(), DefaultPartitions.AppDocuments));
 }
Пример #2
0
        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());
        }
Пример #3
0
        public async Task <TodoItem> GetItemAsync(Guid id)
        {
            var item = await Data.ReadAsync <TodoItem>(id.ToString(), DefaultPartitions.AppDocuments);

            return(item.DeserializedValue);
        }
Пример #4
0
        public async Task <List <TodoItem> > GetItemsAsync()
        {
            var result = await Data.ListAsync <TodoItem>(DefaultPartitions.UserDocuments);

            return(result.Select(r => r.DeserializedValue).ToList());
        }