Moving house

Image

Everything we’ve done so far works exactly the same whether you’re using Entity Framework 4 and .NET Framework 4.0 or Entity Framework 5 and .NET Framework 4.5. Data annotations are an exception—they’ve moved.

In versions of Entity Framework prior to 5, some data annotations were declared in the System.ComponentModel.DataAnnotations namespace (which is part of the .NET class library), but actually in the EntityFramework assembly. That could be a nuisance, because it required a reference to the Entity Framework in your otherwise pristine, persistence-ignorant code files.

In the .NET Framework 4.5, those annotations are now included ...

Get Fluent Entity Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.