samedi 31 octobre 2015

How to Execute UpdateAsync with Where statement

I have a table with 1 row. log => 1 | flagLog => 0

 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;

        }
    }

I got the row with this comand

var updateFlagLog = await con.FindAsync<logon>(u => u.log == 1);

But i dont know how i use to update this row.

Aucun commentaire:

Enregistrer un commentaire