Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

ADO.NET Entity Framework

Introduction to Microsoft's ADO.NET Entity Framework 5.

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to comment

ADO.NET Entity Framework

  1. 1. ADO.NET E N T I T Y F R A M E W O R K Clint Edmonson & Josh Gillespie Polaris Solutions Accretive Health Developer Days
  2. 2. AGENDA • Introduction to EF 5 • Development Approaches • Tips & Tricks • What’s coming in EF 6
  3. 3. INTRODUCTION
  4. 4. • EntityFramework NuGet Package • Included in Visual Studio 2012 • Works with Visual Studio 2010 • Works with .NET 4.0 and 4.5 • Most new features require .NET 4.5 ENTITY FRAMEWORK 5 (EF5)
  5. 5. • EF designer and code first • Enum support • Spatial data types • Performance improvements • EF designer only • Table-valued Functions (TVFs) • Multiple diagrams and coloring • DbContext code generation NEW IN EF5
  6. 6. New Database Existing Database Design First Database First Reverse engineer model in EF Designer Classes auto-generated from model Model First Create model in EF Designer Generate database from model Classes auto-generated from model DEVELOPER WORKFLOWS Code First Code First Define classes and mapping in code EF Power Tools provide reverse engineer Code First Define classes and mapping in code Database created from code Migrations apply model changes to database
  7. 7. EF ARCHITECTURE • Providers • Context • Set • Entities
  8. 8. TIPS & TRICKS
  9. 9. ADVANCED TECHNIQUES • Enums • Complex Types • Many to Many relationships • Proxies & Lazy loading
  10. 10. TIPS & TRICKS • Stored procedures and raw SQL calls • EF Power Tools • SQL statement profiling • DbSet.AsNoTracking • IQueryable.Load() • IQueryable.ToList() • DbSet.Local
  11. 11. OTHER CONSIDERATIONS… • Transactions • Unit testing • Service boundaries • Concurrency • Entity mapping strategies
  12. 12. • Async query and save • Dependency injection pattern • Code first custom conventions • Enums, spatial, etc. on .NET 4.0 • Connection resiliency (retry) • Tooling consolidation • Code first stored procedure support COMING IN EF6
  13. 13. QUESTIONS?
  14. 14. THANK YOU! Clint Edmonson clint.edmonson@polarissolutions.com Josh Gillespie josh.gillespie@polarissolutions.com
  15. 15. APPENDIX
  16. 16. References • http://msdn.microsoft.com/data/ef • http://entityframework.codeplex.com/wikipage?title=specs • http://visualstudiogallery.msdn.microsoft.com/72a60b14-1581- 4b9b-89f2-846072eff19d • http://msdn.microsoft.com/en-us/data/bb419139 • http://jkowalski.com/2010/04/23/logging-sql-statements-in- entity-frameworkcode-first/

    Be the first to comment

    Login to see the comments

  • angelabinkowski

    Nov. 19, 2013

Introduction to Microsoft's ADO.NET Entity Framework 5.

Views

Total views

1,320

On Slideshare

0

From embeds

0

Number of embeds

12

Actions

Downloads

34

Shares

0

Comments

0

Likes

1

×