DEV Community

Discussion on: How YOU can build a Serverless C# .Net Core API in no time, with bindings and a Database

Collapse
 
hugoimran profile image
Imran Hugo

Hi Chris

Thanks for the awesome article. Just wondering if it is possible to have the single inbound trigger with two outbound bindings. The first being a CosmosDb collection and the second being a queue.

The queue message however needs to have the Id of the entry in the CosmosDb.

OR

Would it be better to have it write to the collection in using the inbound trigger and then create a second function with the CosmosDbTrigger which would be triggered when the new document is added. This would then write to a queue from processing.

Collapse
 
softchris profile image
Chris Noring

You can have two output bindings.. I would say though that your second scenario is what I would do.

Collapse
 
hugoimran profile image
Imran Hugo

Hi Chris,

Thanks for the response...I appreciate it. On a seperate topic, have spend quite a fair amount of time on R&D with regards to Azure Index Service, but I am quite interested in how you would utilise Azure Storage. In particular, if I have a bunch of image thumbnails which I have created using a resizer function in Azure...how do I serve these to my web application?

I currently have an onprem application that serves them from a server disk...would I just use the thumbnail URI generated from Azure when it is stored? And if so, how could I use a custom domain for them i.e. myapplication.com/thumbnail/{id}