Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Design

Is there a tutorial for what within an MS Visual Studio solution's project is needed for ms sql server db read/writes?

I have a very simple 4x17 grid of pricing data that I want to create a web page to allow that data to be viewed and edited by a single end user, posting back to the MS SQL Server 2012-held database, into its four respective tables.

I have built a solution in MS Visual Studio Premium (using templates for an ASP.NET MVC4 | Internet application). I have the HTML basically done. I would like to use knokoutJS at this point to present data received from js-based JSON calls, tying that view model to cshtml.

My question is regarding enabling javascript to make the api calls to the controller and respective methods for GET (to view) and for POST (if edits are detected, and 'saved').

The question / tutorial I am looking for is one to show me what files are necessary as the required-infrastructure to enable those api calls. I realize I need 1) controller; 1A) method for GET; 1B) method for POST, but beyond that I do not know what is necessary as far as other potential infrastructure. So for additional files 2-6, which are necessary?

2) do I need a C# data object? 3) do I need an interface? 4) do I need a interface db set? 5) do I need a (non-interface) db set? 6) what else might I potentially need?

Lastly, I am hoping the tutorial will cover how to connect to the MS SQL server database (whether it is only the web.config's connection string I have created, or requires something beyond that and beyond #4 and #5 above).