Skip to content

Instantly share code, notes, and snippets.

@DotNetNerd
Created May 8, 2013 07:33
Show Gist options
  • Save DotNetNerd/5538838 to your computer and use it in GitHub Desktop.
Save DotNetNerd/5538838 to your computer and use it in GitHub Desktop.
Using F# CLIMutable and ImpromptuInterface.FSharp with Dapper
[<CLIMutable>]
type Person = { Name : string; Age : int }
//Nuget: ImpromptuInterface.FSharp
use conn = new SqlCeConnection("Data Source=C:\Databases\MyDB.sdf;Persist Security Info=False;")
conn.Open()
let result =
conn.Query("SELECT * FROM People")
|> List.ofSeq
for person in result do
printfn "%s" person?Name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment