ADO.NET Entity Framework

  • 545 views
Uploaded on

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

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

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
545
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
21
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • ABCs of ORMsEntity Framework ArchitectureDB agnostic abstraction over DB-specific providersApproachesDesignerCode FirstShared Feature Tour/ComparisonEnumSpatial typesFunctions/SprocsLazy vs. eager loadingChange tracking/proxiesInheritance PatternsConcurrency PatternsWorkflowsModel FirstDB FirstCode First New DBCode First Old DBHow to Choose?Best Practices, Tips, TricksView Generation/warm-upConfiguration specificityUnit TestingRetry/Transient faultResist Lazy-LoadService Boundary considerationsoutputToolsEF Power ToolsMiniProfiler/GlimpseLINQPadComing up - Dev Roadmap (EF6)AsyncConnection ResiliencyDependency ResolutionInterception/SQL LoggingBetterTestabilityCustom ConventionsQ&A
  • Where are you today?How are you structured (are DBAs and Devs totally separate?)Ground rules (e.g. please stop us if you have questions)

Transcript

  • 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. AGENDA • Introduction to EF 5 • Development Approaches • Tips & Tricks • What’s coming in EF 6
  • 3. INTRODUCTION
  • 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. • 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. 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. EF ARCHITECTURE • Providers • Context • Set • Entities
  • 8. TIPS & TRICKS
  • 9. ADVANCED TECHNIQUES • Enums • Complex Types • Many to Many relationships • Proxies & Lazy loading
  • 10. TIPS & TRICKS • Stored procedures and raw SQL calls • EF Power Tools • SQL statement profiling • DbSet.AsNoTracking • IQueryable.Load() • IQueryable.ToList() • DbSet.Local
  • 11. OTHER CONSIDERATIONS… • Transactions • Unit testing • Service boundaries • Concurrency • Entity mapping strategies
  • 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. QUESTIONS?
  • 14. THANK YOU! Clint Edmonson clint.edmonson@polarissolutions.com Josh Gillespie josh.gillespie@polarissolutions.com
  • 15. APPENDIX
  • 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/