I've been looking into F# in relation to CRUD with data . and I have been using FSharp.Data.SqlClient
I can't see an easy way to update all fields from an object.
For example I want to execute the code below - and then I want to present that data to a web page. The web page will make some changes ( maybe ) - then I want to use the object to update the database.
I don't want to have to write code to map every single field. Additionally, I am still trying to get my head around how this is done in an immutable way.
let getOrders2() =
let cmd = new SqlCommandProvider<"
SELECT top 10 * from orders
" , connectionString>(connectionString)
let orders = cmd.Execute()
let o2 = orders |> Seq.toList
Updating multiple fields at once from an object is straightforward:
Writing a web app with immutable objects is a big topic. Are you using F# just on the server, or also in the client?