FSharp.CosmosDb
FSharp.CosmosDb copied to clipboard
[new feature] Connection with Identity - Issue #73
This is to implement the new feature suggested in Issue https://github.com/aaronpowell/FSharp.CosmosDb/issues/73 - connection via default identity instead of keys.
~Disclaimer~
~The addition has not been tested as I am still learning how to locally build and test a Nuget package. Any help will be appreciated. So far, I've only read about Nuget local feeds but have no clues on how to compile the whole repo into a .nupkg
file.~
It is supposed to work as follows
let findUsers() =
host
|> Cosmos.host
|> Cosmos.connectWithIdentity
|> Cosmos.database "UserDb"
|> Cosmos.container "UserContainer"
|> Cosmos.query "SELECT u.FirstName, u.LastName FROM u WHERE u.LastName = @name"
|> Cosmos.parameters [ "@name", box "Powell" ]
|> Cosmos.execAsync<User>