Cosmos DB & Azure Functions differences #9829
Unanswered
VistianOpenSource
asked this question in
Q&A
Replies: 2 comments
-
it would appear that there is a difference in functionality with a functions project and other aspire projects. For the functions project it would appear that the connection strings aren't setup in the builder for the functions project but are for others. The 'workaround' appears to be to create a different connection string in the host, and reference that instead in the functions project.
and then use 'container2' in the functions project. At least the Container instance can now be created. I'm not sure if this is by design, or an issue. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Are there any documented differences in the way Aspire & Azure functions projects work/interact?
I have a simple solution whereby the Cosmos DB setup occurs correctly within the App Host, and I can get an Api Service solution to correctly reference the Cosmos Db Container, but when I try and repeat the same code within the Azure Functions project, it results in an exception.
The 'nub' of the exception appears to be
Yet the 'registration within both the host project, the web api project and the azure functions project appears to be identical.
See https://github.com/VistianOpenSource/AspireCosmosDb/tree/master
Beta Was this translation helpful? Give feedback.
All reactions