Azure Functions - get records by attribute name

jothsna gali 1 Reputation point
2020-08-17T15:06:41.5+00:00

I have created a function app to retrieve the records from Azure SQL DB table(loan table). Function app works fine. I want to now add filters and retrieve the records based on loan record attributes ( loan id, loan amount,...). Should I create a new function for each of the attribute that I need or is there any better approach to do it?

Thanks in advance.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,073 questions
{count} votes

1 answer

Sort by: Most helpful
  1. JayaC-MSFT 5,531 Reputation points
    2020-08-20T13:14:21.317+00:00

    @jothsna gali You may want to try with a complex JSON payload in the request body ( assuming this is a Http trigger). You can then deserialize the json body into the required format ( https://www.vainolo.com/2018/10/22/azure-functions-part-3-handling-http-query-get-and-post-requests/) and read the property values which you can use to build the final query - if you follow this approach one function would be sufficient. Otherwise you can have multiple functions based on your requirement.
    Please let me know if this answers your question.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.