public void init(){ var db = database; db.CreateTable<employee>(); var e1 = new employee () { Name = "Liu", AvailableTime = "30 mins", Position = "QUT" }; db.Insert (e1); }
public int InsertOrUpdateNote(employee employee){ return database.Table<employee> ().Where (x => x.Name == employee.Name).Count () > 0 ? database.Update (employee) : database.Insert (employee); }