I have seen plenty of examples on how to query the database but nothing on how to update records. Below is the simple code that I wrote to retrieve a table, but can someone explain me how can I modify a field, say lastActiveDate, and update the table on the database
Thank you, suday
open System
open Microsoft.FSharp.Linq
let connString = "Server=localhost;Database=myDb;Trusted_Connection=True;"
let db = new MyDb(connString)
db.Log <- System.Console.Out
let res =
Query.query <@ seq {
for users in db.userAccounts do
yield users
} @>
|> List.ofSeq
printfn "Totla users: %d" res.Length