ADO.NET Entity Framework
Upcoming SlideShare
Loading in...5
×
 

ADO.NET Entity Framework

on

  • 700 views

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

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

Statistics

Views

Total Views
700
Views on SlideShare
691
Embed Views
9

Actions

Likes
1
Downloads
18
Comments
0

1 Embed 9

http://www.notsotrivial.net 9

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • 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)

ADO.NET Entity Framework ADO.NET Entity Framework Presentation Transcript

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