Last active
December 23, 2018 22:55
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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