Subby
Subby

Reputation: 5480

MVC and SQL Server Compact

I have right clicked on App_Data and added a new SQL Server Compact Local Database. I have created a table called Customer with one field for now - Name.

In which part of the MVC Application, i.e. Controller, Model or View do I send data to the SQL Server and how do I actually send the data itself? How do I connect to the newly made Database?

I have called the Database MyDB.sdf

Upvotes: 1

Views: 250

Answers (1)

Subby
Subby

Reputation: 5480

I used the App.config file to specify the database name using connectionString. This connected to my SQL Server Database which was created in SQL Server Management Studio.

Upvotes: 1

Related Questions