samedi 5 septembre 2015

Search Andriod C# Xamarin Sqlite Database

I need some help to figure out how to search my SQLite database. I am trying to search for their cake and stars this is my connection.

// Create our connection
string folder = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);
var db = new SQLiteConnection(System.IO.Path.Combine(folder, "OnTopFiles.db"));
db.CreateTable<User>();

// Insert note into the database
var note = new User { cake = "frosting marble", stars = "5" };
db.Insert(note);

// Show the automatically set ID and message.
Console.WriteLine("{0}: {1}", note.cake, note.stars);

Aucun commentaire:

Enregistrer un commentaire