IT Deathmatch: Entity Framework vs' Linq to SQL - PowerPoint PPT Presentation

1 / 27
About This Presentation
Title:

IT Deathmatch: Entity Framework vs' Linq to SQL

Description:

OK some, but only a few: no hitting, biting, interrupting. 3 ... Good arguments to make a better decision when choosing between EF and L2S. The contenders ... – PowerPoint PPT presentation

Number of Views:101
Avg rating:3.0/5.0
Slides: 28
Provided by: paulgielen
Category:

less

Transcript and Presenter's Notes

Title: IT Deathmatch: Entity Framework vs' Linq to SQL


1
IT DeathmatchEntity Framework vs. Linq to SQL
  • Paul Gielens

Alex Thissen
Session Code NE.20
2
Agenda
  • IT Deathmatch explained
  • Introducing the contestants
  • Round 1 Architecture
  • Round 2 Programming tooling
  • Round 3 Overtime
  • Announcing the results

3
IT Deathmatch explained
  • Rules there are no rules
  • OK some, but only a few no hitting, biting,
    interrupting
  • 3 rounds of 20 minutes
  • Can the audience participate?
  • Yes! By all means (keep to the rules!)
  • The goal for this deathmatch
  • Good arguments to make a better decision when
    choosing between EF and L2S

4
The contenders
vs
Player 1 Scare aka Paul Gielens
Player 2 LX aka Alex Thissen
5
I want some juice in the morning
  • Entity Framework

Linq to SQL
6
Round 1 Architecture
  • Fight!

Round ends
20
15
5
1
10
minutes remaining
7
Round 2 Programming tooling
  • Fight!

Round ends
20
15
5
1
10
minutes remaining
8
Round 3 Overtime
  • Fight!

Round ends
20
15
5
1
10
minutes remaining
9
Results
  • And the winner is ?
  • Don't let emotions get in the way
  • Choose wisely

10
Evaluation form
Vul je evaluatieformulier in en maak kans op een
van de prachtige prijzen!! Fill out your
evaluation form and win one of the great
prizes!! Session Code NE.20
11
Features
  • L2S only works with the SQL Server provider. By
    design.
  • L2S is strongly coupled to the DB, mapping is
    directly build into the classes. Custom code
    required.
  • L2S has no support for many-to-many relations.
    Custom code required.
  • L2S has no support for creating views of
    Entities. By design.
  • L2S has no support for mapping a single entity to
    multiple tables. By design.
  • L2S has no support for dynamic queries (eSQL
    ObjectServices EntityClient). By Design.
  • L2S designer has no support to regenerate classes
    when the database schema changes. Manual work
    required.
  • L2S only support single table inheritance. By
    design.

12
Source Roger Jennings Visual Studio Magazine
Online
13
Source Roger Jennings Visual Studio Magazine
Online
14
What other have to say
15
  • LINQ to SQL, possibly Microsofts first ORM to
    actually ship in ten years of trying, was never
    even supposed to exist.
  • Matt Warren (architect _at_ Microsoft)

16
  • LINQ to SQL actually stands for LINQ to
    'databases that use SQL' or in other words LINQ
    for the relational data model. LINQ to Entities
    means LINQ for the Entity-Data-Model which is a
    kind of a relational model.
  • Matt Warren (architect _at_ Microsoft)

17
  • Given EF not being positioned as an ORM let's
    open it up so we can take LINQ to SQL forward.
  • Ian Cooper (Microsoft MVP)

18
  • LINQ to SQL is designed around rapid development,
    with direct (11) mapping, while the Entity
    Framework is designed around exposing a rich
    conceptual model with flexible mappings to
    extended ADO.NET Data Providers.
  • Mike Pizzo (architect _at_ Microsoft)

19
  • LINQ to SQL supports rapid development of
    applications that query Microsoft SQL Server
    databases using objects that map directly to SQL
    Server schemas. LINQ to Entities supports more
    flexible mapping of objects to Microsoft SQL
    Server and other relational databases through
    extended ADO.NET Data Providers.
  • Mike Pizzo (architect _at_ Microsoft)

20
  • Over time we will look to customers to help us
    decide whether it makes sense to continue to
    invest in enhancing both stacks or merging into a
    single stack over time.
  • Mike Pizzo (architect _at_ Microsoft)

21
  • There are fears that LINQ to SQL will be ignored
    and slowly forgotten by Microsoft in favor of
    Entity Framework.
  • Julie Lerman (independent software developer)

22
  • LINQ to SQL supports rapid development of
    applications that query all editions of Microsoft
    SQL Server by using programmatic objects that map
    directly to database objects in SQL Server
    schemas, for example, tables, views, stored
    procedures, and user defined functions.
  • Microsoft Data Platform Development

23
  • LINQ to Entities supports a more flexible mapping
    of objects to relational tables, views, stored
    procedures, and user defined functions. You can
    use LINQ to Entities to access data from SQL
    Server and other relational databases through
    extended ADO.NET data providers.
  • Microsoft Data Platform Development

24
  • Microsoft is defining a migration plan for
    customers that start with LINQ to SQL and require
    additional functionality, such as richer mapping
    capabilities or access to other stores, to
    migrate to the ADO.NET Entity Framework.
  • Mike Pizzo (architect _at_ Microsoft)

25
  • If you are writing an application that requires
    any of the following features, you should use the
    ADO.NET Entity Framework
  • The ability to define more flexible mapping to
    existing relational schema, for example
  • Mapping a single class to multiple tables
  • Mapping to different types of inheritance
  • Directly Modeling Many to Many relationships
  • Mapping to an arbitrary query against the store
  • The ability to query relational stores other than
    the Microsoft SQL Server.
  • The ability to share a model across Replication,
    Reporting Services, BI, Integration Services,
    etc.
  • A full textual query language
  • The ability to query a conceptual model without
    materializing results as objects

26
  • If you do not require any of these features, LINQ
    to SQL may provide a simpler solution for rapid
    development. LINQ to SQL is targeted at
    rapid-development scenarios against Microsoft SQL
    Server and provides a simpler approach and richer
    design experience in the Orcas timeframe for
    applications with data classes that map directly
    to the schema of your Microsoft SQL Server
    database.
  • Mike Pizzo (architect _at_ Microsoft)

27
  • Unfortunately, after using LINQ for several
    months both through the RAD designer and using
    POCOs, I can still only recommend LINQ to SQL as
    a RAD tool for limited scenarios. The concept is
    great, but the implementation is lacking in too
    many key areas to be useful at the enterprise
    level. In particular, the lack of support for
    complex and/or legacy relational database
    structures makes using LINQ with any existing
    database in my organization a non-starter.
  • David Nelson
Write a Comment
User Comments (0)
About PowerShow.com