After wearing ourselves out in the real world, my daughter and I…

Today, after wearing ourselves out in the real world, my daughter and I have paddled down the Anduin and through the Argonath, floated in space above the Earth, flown through the Solar System and marveled at the beauty of Saturn’s rings, watched some of The Lego Movie in 3D on a giant theater screen, caused asteroids to explode by staring at them, shot paper balls around a classroom and played a Game Boy under the desk, until the game came out of the Game Boy and filled the classroom, sat in a cafe in Paris as a robot, enjoyed butterflies fluttering around us and petals floating softly from above, ridden a roller coaster through a lava factory, and flown inside our own Minecraft worlds. This is just the beginning. Thank you Oculus. Everything is awesome.

Advertisements

EF 6.1: Creating indexes with IndexAttribute

Since EF 4.3 it has been possible to use CreateIndex and DropIndex in Code First Migrations to create and drop indexes. However this had to be done manually by editing the migration because the index was not included anywhere in the Code First model. Now with EF 6.1 it is possible to add index specifications to the model such that creating and dropping indexes can be handled automatically by Migrations. Continue reading

EF 6.1: Turning on logging without recompiling

I already blogged about SQL logging in EF6. Part 3 of that series shows how to use EF with a logging framework such as NLog. If you do this then you can easily switch logging on and off using NLog or equivalent without any changes to the app. This is the approach I would use if I wanted to log SQL from EF. But what if logging was not considered at all when the app was created? Now with EF 6.1 you can switch logging on for any app without access to the source or recompiling. Continue reading

EF6 release dates…or lack thereof

On the EF team we frequently get questions along the lines of, “when will the next version of EF be released?” This is an entirely reasonable question to ask and it is frustrating to me personally that I cannot answer such questions. But of course this is nothing compared to the frustration felt by those of you who never get an answer. So why is it this way?

Update: Visual Studio 2013 has been announced for “this year” by Brian Harry. If you read the rest of this post you will realized that this means EF6 RTM will be also released “this year”. Continue reading

Database initializer and Migrations Seed methods

Entity Framework contains two different methods both called Seed that do similar things but behave slightly differently. The first was introduced in EF 4.1 and works with database initializers. The second was introduced in EF 4.3 as part of Code First Migrations. This post describes how these two methods are used, when they are called, and how they differ from each other. Continue reading