Example #1
0
        public async Task DeleteTableObjectImmediatelyAsync(TableObject tableObject)
        {
            await Task.Run(async() =>
            {
                await InitAsync();
                await tableObject.LoadAsync();
                tableObject.DeleteFile();

                await database.RunInTransactionAsync((SQLiteConnection tran) =>
                {
                    // Delete the properties of the table object
                    foreach (var property in tableObject.Properties)
                    {
                        tran.Delete(property);
                    }

                    tran.Delete(tableObject);
                });
            });
        }