FSharp.CosmosDb icon indicating copy to clipboard operation
FSharp.CosmosDb copied to clipboard

[new feature] Connection with Identity - Issue #73

Open kumkee opened this issue 2 years ago • 4 comments

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>

kumkee avatar Dec 05 '23 19:12 kumkee

Perhaps the info in https://github.com/jet/dotnet-templates#testing and/or the build.proj in there might help with techniques and/or automation for testing the package

bartelink avatar Dec 06 '23 08:12 bartelink

Nah, something stuffed up in the paket.lock file that I'll have a look at when I have some time.

aaronpowell avatar Dec 06 '23 09:12 aaronpowell

Nah, something stuffed up in the paket.lock file that I'll have a look at when I have some time.

Any progress?

kumkee avatar Feb 07 '24 17:02 kumkee

The update has been tested. If you can't wait for the merge and want to use connection with identity right now, you can use my NuGet packet which contains the update.

kumkee avatar Mar 04 '24 07:03 kumkee