Beginner here so apologies in advance for my ignorance.
I am in the process of making a web application that has a really simple catalogue of products using Visual Studio, C# and SQL Server. Aside from listing all products, it also needs to do things like only show products from a certain category. It is for an assessment only so at this stage not too concerned with preventing SQL injection etc.
I have the database set up and all the content for the pages. I have connected the database and can get it to list all products.
The issue is with showing only items from a certain category. Super simple SQL query obviously, but I don't even know where to begin with coding it.
I have used the SQL editor included with Visual Studio and can get the queries working there, but am unsure of how to insert them into the pages so the results show up for the user.
I have tried looking on google and youtube but for some reason can't seem to find anything basic enough. Ideally I'd love a tutorial or even just some example code as I tend to learn better that way than by reading complex instructions.
If anyone knows of any resources or could point me in the right direction, I'd be super grateful!
x-post /r/learnprogramming but I thought this sub seemed to have more visual studio users!
by ikarka via /r/csharp