Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
open System.Data.SqlClient
[<EntryPoint>]
let main argv =
let getDbConnection() =
let connection = new SqlConnection("a_real_sql_connection_string")
connection.Open()
connection
let getAllProducts() =
DB.allProducts (getDbConnection())
|> fun x -> match x with
| Ok p-> p|> Seq.toList
| Error e -> List.Empty
let tryUpdateProductDimensions (productId: int)=
getAllProducts()
|> fun products -> UpdateProductDimensions.find (productId, products)
|> fun product -> UpdateProductDimensions.update product
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.