Feature |
LINQ to SQL |
Entity Framework/Entity Data Model |
Supported databases |
SQL Server 200x (Express, Compact) only |
SQL Server 200x (Express, Compact) and other relational databases with an EF-enabled ADO.NET managed data provider |
Data model |
1:1 relationship enforced between tables and entities |
Tables can be mapped to multiple entities and vice versa |
Model-first design |
Not available |
Not available (promised in version 2) |
Update Model for Data Store Schema Changes |
Requires third-party add-in utility |
Supported |
Plain Old CLR Object (POCO) classes |
Optional (by mapping file) |
By unsupported code generator |
N-tier deployment |
Not out-of-the-box |
By unsupported code modifications |
DataContract serialization of cyclic object graphs |
Requires unsupported Text Template Transformation Toolkit (T4)
code-generator template |
Supported |
Inheritance models |
Table per Hierarchy (TPH) only |
TPH, Table per Class (TPC), and Table per Concrete Class (TPCC) |
Association loading methods |
Deferred/lazy (default) and eager |
Eager (optional), deferred by unsupported
code modifications |
Many-to-many relationships |
Not supported (require a relation table) |
Supported (don't require a relation table) |
Foreign-key values |
Visible |
Not visible (visible promised in version 2) |
Query language(s) |
LINQ to SQL, direct execution |
LINQ to Entities, Entity SQL, query builder methods |
Stored procedure support |
CRUD sprocs supported in the designer |
T-SQL CRUD sprocs supported in the designer; other DBs unknown |
DAL for ADO.NET Data Services ("Astoria") |
Read-only (without
implementing IUpdatable<T>) |
Default DAL (full read/write support) |
DAL for ASP.NET Dynamic Data |
Default DAL (full read/write support) |
Requires a workaround |
Generate a 120-table model in the designer |
22 seconds |
50 seconds |
120-table startup time (cold) |
0.394 second |
9.426 seconds |
120-table startup time, T4 compiled view (cold) |
N/A |
2.063 seconds |
120-table startup time (cached) |
0.004 second |
0.021 second |
EntityType name singularization |
Automatic (optional) |
Manual |
EntitySet name pluralization |
Automatic (optional) |
"Set" prefix added if EntityType name is manually singularized (English-only, forced, not optional) |
Support for new SQL Server 2008 data types |
Date, Time, DateTime2,
DateTimeOffset, Filestream |
Date, Time, DateTime2, DateTimeOffset, Filestream |