How can I use DbCommand.ExecuteScalar from F#? It returns an obj which I need to convert to an int. I'm very new to F# and the casting I need to do is not clear.
let (stockid:uint32) = command.ExecuteScalar()
Compile Error:
Type constraint mismatch. The type obj is not compatible with type uint32
Upcasting using :?> throws a runtime error.