lundi 15 juin 2015

How to set SQLite(SQLite.NET component) database Version in Xamarin Android

I want to give the version for the sqlite(SQLite.NET component) database while creating it in Xamarin(Monodroid) , And how to handle the version of database during any modifications in the table and update in playstore. how I can get OnUpgrade functionality like android native SQLiteOpenHelper class.

I am using below way

string folder = Environment.GetFolderPath   (Environment.SpecialFolder.Personal);
var conn = new SQLiteConnection (System.IO.Path.Combine (folder, "stocks.db"));
conn.CreateTable<Stock>();
conn.CreateTable<Valuation>();

Aucun commentaire:

Enregistrer un commentaire