This code will create the Database in : LocalFolder
string DBPath = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "customers.sqlite");
using (var db = new SQLite.SQLiteConnection(DBPath))
{
// Create the tables if they don't exist
db.CreateTable<Customer>();
db.CreateTable<Item>();
}
The problem:
- The code below here will not reset the Primary Key to 0 (or starting number ) for each of the table Once each of them has been used before. Is this code only empty the table but not reset the Primary Key?
How to delete the customers.sqlite ( Database created ) so that this will reset all Primary Key to starting number like 0.
using (var db = new SQLite.SQLiteConnection(DBPath))
{
db.DeleteAll<Customer>();
db.DeleteAll<Item>();
}