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
module DapperFSharp = | |
open System.Data.SqlClient | |
open System.Dynamic | |
open System.Collections.Generic | |
open Dapper | |
let dapperQuery<'Result> (query:string) (connection:SqlConnection) = | |
connection.Query<'Result>(query) | |
let dapperParametrizedQuery<'Result> (query:string) (param:obj) (connection:SqlConnection) : 'Result seq = |
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.Runtime.CompilerServices | |
[<Extension>] | |
type public FSharpFuncUtil = | |
[<Extension>] | |
static member ToFSharpFunc<'a> (func:System.Func<'a>) = fun () -> func.Invoke() | |
[<Extension>] | |
static member ToFSharpFunc<'a,'b> (func:System.Converter<'a,'b>) = fun x -> func.Invoke(x) |