Author Archives: Arthur Vickers
How software engineers make cookies, or a true story about over thinking everything…
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 … Continue reading
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 … Continue reading
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 … Continue reading
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 … Continue reading
In parts 1 and 2 of this series we looked at how to use DbContext.Database.Log to log the SQL generated by EF. But this code is actually a relatively thin façade over some low-level building blocks for interception in general … Continue reading
In part 1 we saw how DbContext.Database.Log can be used to easily log SQL to the console or some other TextWriter. This post covers how the context and formatting of the output can be changed.