0
我很新的SQLite,我試圖從SQLite數據庫中獲取一個字符串。但是我無法返回people.Name,因爲人是AsyncTableQuery。有任何想法嗎?SQLite數據庫訪問Xamarin.form
這是代碼:
readonly SQLiteAsyncConnection _database;
public string GetNameByID(int id)
{
var people = from t in _database.Table<Model>() where t.ID == id select t;
return people.Name;
}