Benas Radzevicius
Benas Radzevicius

Reputation: 377

Where EntityFramework is putting my data?

I just started a new project with ASP.NET MVC5 and Entity Framework 6. My problem is, that I cannot find where EF is putting my data.

For testing I added rows to the database using EF context.Users.Add(...); context.SaveChanges(); and I was successful, but I cannot see the database created (just before doing an screenshot i have refreshed the database list).

When I run update-database in Package Manager Console, database creates as it should, but on the web, it uses something else (same database where my 9 entities are saved).

Could someone tell me what is happening, where EF is saving those entities and how to fix it? Thanks.

Upvotes: 0

Views: 93

Answers (1)

3dd
3dd

Reputation: 2540

Your probably using a Local db, which defaults to

C:\Users\user-name\

The following explains this functionality

http://blogs.msdn.com/b/sqlexpress/archive/2011/10/28/localdb-where-is-my-database.aspx

Upvotes: 2

Related Questions