Model Domain Objects with the Entity Framework: Table 2: Compare EF Beta 3 Features with LINQ to SQL RTM.

The basic distinction between these two O/RMs is that Entity Framework (EF) is targeted at enterprise scenarios, while LINQ to SQL is best suited for rapid application development (RAD) with SQL Server 200x and, to a lesser extent, SQL Server Compact Edition 3.5. However, your O/RM tool choice might be influenced or even determined by support for one or more of the features in this table.
Feature Entity Framework Implementation LINQ to SQL Implementation
Supported databases Any relational database with an Entity Framework-enabled ADO.NET data provider; SQL Server 200x is the default; Third-party providers for IBM-DB2,
Firebird, Informix, Ingres, MySQL, Oracle, PostgreSQL, SQLite and VistaDb are available or in development
SQL Server 200x and partial (non-
graphical) support for SQL Server
Compact Edition 3.5 only
Inheritance model Table per type, table per concrete type, table per
hierarchy
Table per hierarchy only
Type and collection names Independent; it’s typical to edit type names to
singular and accept default plural collection names
Type and collection names are the same; names are singularized by default
Schema independence Three-tier mapping layer makes domain object model independent to database schema; can map multiple tables to a single entity or vice versa Direct, one-to-one mapping; Domain objects are created directly from the database and bound to its schema
Update model when
database schema changes
Automated Manual
Graphical designer Multi-pane entity view with tree-view Model Browser and tabular table column to property mapping window Dual-pane class view with Methods pane for stored procedure assignment
Three-tier WCF
service architecture
"Perseus" add-on code enables serializing CRUD
operations between physical tiers with WC
LINQ to SQL has no "out-of-the box
n-tier story"
Many:many relations Supported without relation table if no payload Relation table required
Complex (value) types Supported Not supported
Loading related entities Explicit load instruction required; eager loading is
the default
Implicit lazy loading is the default; explicit eager loading is optional
Related entity loading management for sort
order and depth
Requires use of the EntityCollection.Attach() and
EntitySet.CreateSourceQuery() methods
Simple LINQ predicates or stored procedures applied to DataContext
Foreign key value
visibility
Not visible; association endpoints (EntityReferences and EntitySets) replace foreign keys Visible; foreign keys supplement association endpoint
High-performance, low-overhead DataReaders Supports hierarchical/polymorphic DataReaders Not supported
Query languages LINQ to Entities, Entity SQL, and ObjectQuery (uses
Entity SQL)
LINQ to SQL (most Standard Query
Operators)
Stored procedure support  All CRUD operation All CRUD operation
comments powered by Disqus

Featured

  • Mastering AI Development and Building AI Apps with GitHub Copilot

    Two Microsoft experts explain how GitHub Copilot is evolving from a coding assistant into a broader platform for building, customizing and testing AI-powered developer workflows.

  • VS Code 1.123 Adds Agent Session Sync, 1M Context Windows

    Microsoft released Visual Studio Code 1.123 on June 3, adding agent-focused features, larger model context support, integrated browser updates and a new delay for some automatic extension updates.

  • Copilot Billing Shock Hits Developers

    Developer complaints about GitHub Copilot's new usage-based billing model have centered on unexpectedly rapid AI credit consumption, and neither GitHub nor Microsoft has responded directly to the backlash, though they have previously published guidance to lessen model usage costs.

  • Hands On with GitHub Copilot App Technical Preview: Turning a Blazor Issue into a PR

    GitHub's brand-new Copilot desktop app, in technical preview, handled a small Blazor issue from planning through pull request creation, but the hands-on test also showed why developers still need to verify agent work in the running app before merging.

Subscribe on YouTube