My organization uses IMIS, a membership/event database that stores its data in our sql server 2005 db. I’ve been developing classes and service layers to interface with that data using – wait for it – asp.net 1.1, and my lord I am ready to make the switch to something a little more modern.
So after experimenting with CakePHP on the side, being a microsoft shop, I’d like to use MVC4 to take care of all of my future applications, but it seems that every tutorial I find on the subject uses an SQL Server Express instance – there doesn’t seem to be much mention of connecting to a remote 2005 or a remote 2008 server.
Full disclosure, I have seen a few comments here and there mentioning that the name of the class and connection string and database all have to be related, but I haven’t found any clear indication of what the rule of thumb is.
If anyone can give me some basic steps as to how to set this up, I’d be forever grateful.
Thanks.
If you have existing Database you want to connect to I would suggest using Entity Framework with Database First approach.
You probably could find many tutorials, here is the one particularly for Entity Framework + Database First + MVC:
http://www.c-sharpcorner.com/UploadFile/abhikumarvatsa/database-first-approach-in-entity-framework/