This repository has been archived on 2022-11-03. You can view files and clone it, but cannot push or open issues or pull requests.
DevOpsOpenHack/MobileApps/MyDriving/MyDriving.DataStore.Abstractions/IBaseStore.cs

22 lines
765 B
C#
Raw Normal View History

2022-11-03 20:41:13 +00:00
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
using System.Collections.Generic;
using System.Threading.Tasks;
namespace MyDriving.DataStore.Abstractions
{
public interface IBaseStore<T>
{
string Identifier { get; }
Task InitializeStoreAsync();
Task<IEnumerable<T>> GetItemsAsync(int skip = 0, int take = 100, bool forceRefresh = false);
Task<T> GetItemAsync(string id);
Task<bool> InsertAsync(T item);
Task<bool> UpdateAsync(T item);
Task<bool> RemoveAsync(T item);
Task<bool> RemoveItemsAsync(IEnumerable<T> items);
Task<bool> SyncAsync();
Task<bool> DropTable();
}
}