• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Building data centric applications for web, desktop and mobile with Entity Framework 5
 

Building data centric applications for web, desktop and mobile with Entity Framework 5

on

  • 1,193 views

More info on Techdays.be

More info on Techdays.be

Statistics

Views

Total Views
1,193
Views on SlideShare
1,193
Embed Views
0

Actions

Likes
0
Downloads
41
Comments
0

0 Embeds 0

No embeds

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

    Building data centric applications for web, desktop and mobile with Entity Framework 5 Building data centric applications for web, desktop and mobile with Entity Framework 5 Presentation Transcript

    • Data centric apps for Web, desktopand mobile with Entity Framework 5Diego VegaDeveloper LeadMicrosoft
    • Data Centric Apps with EF5 | Agenda What is Brief EF new in Demos Post EF5overview EF5
    • EF Overview | What is EF? • Recommended technology to connect .NET Microsoft’s applications to databases Object/Relational • LINQ against disparate relational databases Mapper • Make .NET & Windows Azure the best platform for data centered apps Product goals • Be the most productive data access API
    • EF Overview | Developer Workflows Designer-centric Code-centric Model first Code first New • Create .edmx model in designer • Define classes and mapping in code database • Generate database from .edmx • Database auto-created at runtime • Classes auto-generated from .edmx Database first Code first Existing • Reverse engineer into .edmx model • Reverse engineer into code model database • Classes auto-generated from .edmx • Requires EF PowerTools download
    • EF5 | How we ship it EF NuGet Package • DbContext, Code First & Migrations • Included in VS 2012 • Works with .NET 4.0 & 4.5, VS 2010 & 2012 EF Core bits in .NET • Updated in .NET 4.5 • New features like Enums, Spatial, better performance, etc. EF Designer in VS • Updated in VS 2012 • New features like multiple diagrams, colorization, DbContext code generation, etc.
    • EF5 | Major new features Both for code-centric and designer-centric developers • Enum support • Spatial data types • Auto-compiled query • Parameter evaluation performance Only for designer-centric developers • Table-valued Functions (TVFs) • Multiple diagrams and coloring • Batch import of stored procedures • DbContext code generation
    • Demo: Park Finder
    • EF5 | Performance ImprovementsInline LINQ query CompiledQueryreturn db.People.First(e => e.Id == id); private static readonly Func<MyContext, int, Person> findPerson = CompiledQuery.Compile((MyContext db, int id) => db.People.First(e => e.Id == id)); … return findPerson(id);
    • EF5 | Performance Improvements// Micro-benchmark: repeated execution of a query by keyusing (var db = new MyContext()){ for(int id = 0; id < 5000; id++) { db.People.First(e => e.Id == id); }}
    • EF5 | Query by key benchmarkresults 2500% 2000%Time spent 1500% 1000% 500% 0% HANDCODED EF RAW SQL EF COMPILED ENTITY SQL LINQ TO LINQ TO SQL ADO.NET QUERY ENTITIES Handcoded ADO.NET EF Raw SQL EF Compiled Query Entity SQL LINQ to Entities LINQ to SQL.NET 4.0 100% 199% 262% 1518% 2314% 1650%.NET 4.5 100% 211% 269% 406% 412% 1350%
    • EF5 | Web end-to-end benchmark 125 Runs on .NET 4.5 up to 67% faster than on .NET 4.0! 100Average Rows Per Second Parameter evaluation optimization 75 Auto-compiled queries 50 25 0 8/8/2011 8/15/2011 8/22/2011 8/29/2011 9/5/2011 9/12/2011 9/19/2011
    • EF6 | Go to my EF6 talk for more!Open source with contributions Major new featuresCode under Apache 2.0 license  Async query & saveTargeting mid-2013 RTM  Enums, spatial, etc. on .NET 4.0  Code-based configurationMicrosoft  Connection resiliency (retries)license, branding, quality and  DbContext connection andsupport transaction improvements  Code First  Custom conventions  CUD stored procedure support  Tooling consolidation
    • EF | ResourcesVote Follow ef.mswish.net  @efmagicunicornsLearn  @divega msdn.com/data/ef  facebook.com/efmagicunicornsContribute  blogs.msdn.com/adonet entityframework.codeplex.com  blogs.msdn.com/diego