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?
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 →
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 and, in this case, DbCommand interception in particular. Continue reading →
On the EF team we made a late decision to add some support for interception and logging of generated SQL in EF6. To this end recent checkins have added support for:
A Log property for the context similar to DataContext.Log in LINQ to SQL
A mechanism to customize the content and formatting of the output sent to the log
Low-level building blocks for interception giving greater control/flexibility
(Note that most of what is described here came in too late and is therefore not part of the beta 1 release. Instead you can try it out using a recent nightly build and it will be included in the upcoming RC release.)