1
我有一個包含1行的表。日誌=> 1 | flagLog => 0如何使用Where語句執行UpdateAsync
public async void updateFlag()
{
var local = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "hinos.sqlite");
SQLiteAsyncConnection con = new SQLiteAsyncConnection(local, SQLiteOpenFlags.Create | SQLiteOpenFlags.ReadWrite);
var updateFlagLog = await con.FindAsync<logon>(u => u.log == 1);
if (updateFlagLog != null)
{
await con.UpdateAsync(?????);
// update logon set flagLog = 1 where log = 1;
}
}
我行與此COMAND
var updateFlagLog = await con.FindAsync<logon>(u => u.log == 1);
但我不知道如何使用更新此行。
你試過'updateFlagLog.flagLog = 1',然後簡單地'con.UpdateAsync(updateFlagLog)'? – Camo
@Rencamo thx很多人,跑!我嘗試了很多方法,但它非常簡單haha –