Workaround for performance with Enumerable.Contains and non-Unicode columns against EF in .NET 4.0

This week we announced the availability of EF6 alpha 2 (read the announcement post in our blog and Scott Guthrie’s post for more information), which includes a great performance improvement for Enumerable.Contains. This reminded me of another improvement we did in EF5 (in EF core bits in .NET 4.5) to improve the translation of the…

2

Tips to avoid deadlocks in Entity Framework applications

UPDATE: Andres Aguiar has published some additional tips on his blog that you may also find helpful when dealing with deadlocks. Recently a customer asked a question about how to avoid deadlocks when using EF. Let me first say very clearly that I don’t actually hear about deadlock issues with EF often at all. But deadlocks are a…

8

Exception from DbContext API: EntityConnection can only be constructed with a closed DbConnection

UPDATE: After I posted this article we found that the plan we had to enable the pattern with contex.Database.Connection.Open() would cause breaking changes in important scenarios: the connection, the EF model, and potentially the database would be initialized any time you somehow acess the Database.Connection property. We decided to back out of this plan for EF 5,…

3

Why Entity Framework vNext will be EF5 and nothing else

This post touches on some history and on how different rationales have driven versioning of the Entity Framework for the last few years. I recommend you to continue reading only if you care about learning how things went in detail, otherwise here is all you need to know: The Entity Framework now versions separately from…

5

Stored procedures with output parameters using SqlQuery in the DbContext API

The DbContext API introduced in Entity Framework 4.1 exposes a few methods that provide pass-through access to execute database queries and commands in native SQL, such as Database.SqlQuery<T>, DbSet<T>.SqlQuery, and also Database.ExecuteSqlCommand. These methods are important not only because they allow you do execute your own native SQL queries but because they are right now…

18

Self-Tracking Entities: ApplyChanges and duplicate entities

Some customers using the Self-Tracking Entities template we included in Visual Studio 2010 have ran into scenarios in which they call ApplyChanges passing a graph of entities that they put together in the client tier of their app, and then they get an exception with the following message: AcceptChanges cannot continue because the object’s key…

10

EF Design Post: POCO template generation options

It has been some time since the last time my team posted anything to the Entity Framework Design blog. The truth is we have been extremely busy finishing the work on Entity Framework 4. It feels great to be almost done! And now one of my favorite phases of the product cycle begins, again… How…

2

What would you like to see in Entity Framework vNext?

With Visual Studio 2010 and .NET 4.0 very close to RTM, many of us in the team are spending more and more time brainstorming about the features and experiences that we would like to include in the next release of EF. I don’t think I need to tell how exciting that is 🙂 During the…

0

Entity Framework and Data Services Teams are Hiring

Just a quick note on this: Our team is hiring! If you think you have the skills and the will to improve how developers around the world deal with data in their applications, then this is a great opportunity to be in the forefront of the industry and also to become part of a nice…

0