troubleshooting Question

Web API Visual Studio - Get query (with parameters)

Avatar of hindersaliva
hindersalivaFlag for United Kingdom of Great Britain and Northern Ireland asked on
Microsoft SQL ServerRESTMicrosoft Visual Studio
13 Comments1 Solution22 ViewsLast Modified:
I created my first ever Web API using Visual Studio Core, using the database-first approach, with a SQL Server on Azure and hosted on Azure. The GET returns only about 20 rows of data of about 3 column, which is all the content in the table. This was easy and works fine.

Now I want to create a similar Web API, but on a table that has 100,000 rows and 20 columns. But I only want to GET about 150 rows at any time, filtered by 3 columns. So, I'm thinking the way to do this is to get ALL of the rows and then filter on the client side (Google Sheets), but I'm thinking it is not practical (will take too long to get). Or, is it?
I'm thinking the way to go is to send the parameters to the query (like I do with ADO/SQL directly on the SQL Server from an Excel application). But I don't know how to as yet with a Web API.

Questions:
1. is getting 100,000 rows way too much?
2. if so, can I have a Stored Procedure working with the Web API? (as my only knowledge is of the database-first approach to building the API, from a database table and not a Stored Procedure. Newbie).

Any advice welcome, and any links to an example to follow please?
Thank you


ASKER CERTIFIED SOLUTION
Chinmay Patel
Chief Technology Ninja
Join our community to see this answer!
Unlock 1 Answer and 13 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros