Building the ISQLiteStorage interface

Now we must set up another class, which  will be used to control the queries performed on the database. Add a new file called ISQLiteStorage.cs into the Storage folder and implement the following:

public interface ISQLiteStorage { void CreateSQLiteAsyncConnection(); Task CreateTable<T>(CancellationToken token) where T : class, IStorable, new(); Task InsertObject<T>(T item, CancellationToken token) where T : class, IStorable, new(); Task<IList<T>> GetTable<T>(CancellationToken token) where T : class, IStorable, new(); Task<T> GetObject<T>(string key, CancellationToken token) where T : class, IStorable, new(); Task ClearTable<T>(CancellationToken token) where T : class, IStorable, new(); Task DeleteObjectByKey<T>(string ...

Get Xamarin Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.