Entity Framework Code First - Where is my database
So you have started up a code first project using Entity Framework - You're happily coding along but at some point you probably want to know where your database is.
Since all of the wiring up of the database happens automatically when you're running the update-database command you might not be aware of where it is.
. . .Posted in: entity framework
Reset Entity Framework migrations
The fine art of starting over with code first migrations
Code first migrations for Entity Framework are great but migrations add up over time. Sometimes you really need to clean them out to keep on top of what's going on. Sometimes you just wish you could start fresh.
Be advised that the solution you will see in this post will be irreversible - Please use source control and back up . . .
Posted in: entity framework
Logging SQL statements in Entity Framework with interception
In a previous post I have shown how to log SQL statements that Entity Framework creates for us. In that post we used DbContext.Database.Log for logging. DbContext.Database.Log is a very effective tool but if you want more flexibility you should try out DbCommand Interception.
DbCommand Interception makes it available for you to . . .
Posted in: entity framework
Logging SQL statements in Entity Framework
Using an ORM like Entity Framework it can often be beneficial to see what goes on "under the hood". When debugging or performance enhancing your applications you need to know how the SQL statements that are executed towards your database looks like. Entity framework has a few ways of doing just that. Lets have a look at a some easy . . .
Posted in: entity framework
Code first migration commands for Entity Framework
Code first migrations in Entity Framework has existed since Entity Framework 4.3. But migrations are still accessed from the package manager console and it's not always easy to remember the commands and the parameters that go with them. This post will provide you with a quick reference for the most commonly used command names and . . .
Posted in: entity framework