F# doesn't have "out of the box" support for dynamic typing (although it's something that you could add support for). Instead, it would be nice to be able to request an IDictionary<String,Object>> from a query e.g.
let data = conn.ExecuteQuery<IDictionary<string, obj>> "SELECT Col1, Col2 FROM Table" // data is type IEnumerable<IDictionary<string, obj>>
let stuff = data |> Seq.map(fun row -> row.["Col1"]) // get a list of all Col1 values
You can work around this with a one liner, but not everyone (and especially developers with no C# experience) will know how to do this:
let data = conn.ExecuteQuery "SELECT Col1, Col2 FROM Table" // data is type IEnumerable<obj>
let dataAsDict = data |> Seq.cast<IDictionary<string, obj>> // dataAsDict is type IEnumerable<IDictionary<string,obj>>
F# doesn't have "out of the box" support for dynamic typing (although it's something that you could add support for). Instead, it would be nice to be able to request an
IDictionary<String,Object>>from a query e.g.You can work around this with a one liner, but not everyone (and especially developers with no C# experience) will know how to do this: