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 ...