Skip to content

Instantly share code, notes, and snippets.

@DominicFinn
Created July 10, 2014 09:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DominicFinn/a53643605c59b52e139f to your computer and use it in GitHub Desktop.
Save DominicFinn/a53643605c59b52e139f to your computer and use it in GitHub Desktop.
Enough to get a hold of your database in F#
#r "FSharp.Data.TypeProviders.dll"
#r "System.Data.Linq.dll"
open System
open System.Linq
open System.Data
open Microsoft.FSharp.Data.TypeProviders
open System.Text.RegularExpressions
[<Literal>]
let connectionString = "conn string"
type Sql = SqlDataConnection<connectionString>
let db = Sql.GetDataContext()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment