Quote:
Originally Posted by shitboi
Ok, the title is very vague, I'll provide the details here.
I have a MVC3 application that requires connection to a database. I have already created the necessary tables in a database in Sql Server 2008, and i have verified that MSVS2010 can detect my DB. My question is how to make my application query the DB?
When i worked on another solution, there is a sub project in that solution that handles all database connections. This project seems to be able to populate classes based on tables in the DB. Can someone enlighten me how is that done?
Though this is not directly associated with the topic CO programming. I do think that the knowledge is common across all types of programming (especially CO ps development).
EDIT: if possible, can one please provide me screenshots/video of how to properly connect my application to a sqlserver DB and query it. I don't mind what is the methodology used; be it direct query using sql commands or using C#.Net LINQ features.
|
What kind of SQL server do you use? I experienced small differences between seperate SQL servers. Like mysql has some small differences to microsft sql. Though those diffrences aren't that hard to find out.
The connecting is not hard as it may sound, there are lots of tutorials based on that on youtube(look

), but if you're more experienced in programming you can also find the neccesary script parts in SQL-based conquer online private server sources and copy the parts you need. ;]
Ofcourse you either can write it all by yourself, but I guess you won't be asking around here if you'd be capable to do so. :P
If you want to use a tutorial on youtube, make sure you use the one for your SQL.
Hope this makes it a little more clear