I have a mvc3 application which has a database for its own. but my site need to get data from another program which uses its own database and also I need to run a store procedure which is located in that database.
I want to know that is the best action is to make sql connection and run that store procedure and make query for those data or there is a better way for handling this issue in mvc3?
I have a mvc3 application which has a database for its own. but my
Share
There are many ways to perform database access in .NET. If this other program doesn’t provide you with a strongly typed API to query the database you could use plain ADO.NET with SqlConnection, SqlCommand (which among other allow you to invoke stored procedures) or an ORM such as Entity Framework.