aaronpowell / FSharp.CosmosDb

An F# wrapper around Cosmos DB's .NET SDK to make it more friendly for F# developers
MIT License
79 stars 12 forks source link

[new feature] Connection with Identity - Issue #73 #74

Open kumkee opened 12 months ago

kumkee commented 12 months ago

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>
bartelink commented 12 months ago

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

aaronpowell commented 12 months ago

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

kumkee commented 10 months ago

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

Any progress?

kumkee commented 9 months ago

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.