ckonig
ckonig

Reputation: 1234

Which Database is my ASP NET MVC 3 CodeFirst Project using?

I need to find out, which database is used by default when I create a MVC3 project with EF 4.3 using the Code First approach. I have not entered any connection information in the Web.config, the application is working , but I cannot find any related data in my local SQL 2008 Server.

Thanks in advance!

Upvotes: 0

Views: 561

Answers (2)

y.selivonchyk
y.selivonchyk

Reputation: 9900

SQL Express will be used by default. Check your AppData folder to find your database file.

Upvotes: 1

Ray
Ray

Reputation: 4108

SQL Express server in your local machine by default, you can also change the connection via DbContext constructor or web.config file. Following two links will help you to understand how EF connect database

http://blogs.msdn.com/b/adonet/archive/2011/01/27/using-dbcontext-in-ef-feature-ctp5-part-2-connections-and-models.aspx

http://blogs.msdn.com/b/adonet/archive/2012/01/12/ef-4-3-configuration-file-settings.aspx

Upvotes: 1

Related Questions