70 likes | 195 Vues
This comprehensive overview examines the evolution of Entity Framework, highlighting its significant versions from EF 1, shipped with .NET 3.5 SP1, to the latest EF 5.0 requiring .NET 4.5. We delve into key features such as Database First, Model First, Code First workflows, POCO, migrations, and the introduction of DbContext API. The framework’s adaptations for Visual Studio and NuGet distribution are also discussed, providing insights into its production readiness and the migration pathways for developers.
E N D
Introduction to(the current state of)Entity FrameworkLevel 100 TolgaBalci
State of Entity Framework EF 4.3 (Current) • EF 1 • Shipped with .NET 3.5 SP1 • Features: • Basic ORM support • Database FirstWorkflow • EF 4 • Shipped with .NET 4.0 and VS 2010 • Features: • Model First Workflow • POCO, FKs, Lazy Loading, T4 Code Generation, … EF 4.1 (Magic Unicorn) EF 4 (.NET 4.0) EF 1 (.NET 3.5 SP1)
State of Entity Framework EF 4.3 (Current) • EF 4.1 • Features: • Code FirstWorkflow • DbContext API • GAC Installed • EF 4.3 • Features: • Migrations • NuGet only distribution model • EF 5.0 • Will require .NET 4.5 and ship with VS 11 EF 4.1 (Magic Unicorn) EF 4 (.NET 4.0) EF 1 (.NET 3.5 SP1)
Production Ready? • State of Linq to SQL • Choice for Microsoft teams • Move forward choice • EF on second version - New API on first version
Developer Workflows Designer Centric Code Centric New Database • Model First • Create .edmx model in designer • Generate database from .edmx • Classes auto-generated from .edmx • Code First • Define classes & mapping in code • Database auto-created at runtime Existing Database • Database First • Reverse engineer .edmx model • Classes auto-generated from .edmx • Code First • Define classes & mapping in code(Reverse engineer tools available)
Links • Channel9.msdn.com • Visual Studio Toolbox: Entity Framework Part 1 and 2 • msdn.com/data/EF • Get Started Resources • Code First • Model & Database First • Code First & Migrations • Many Videos