Entity Framework vs LINQ to SQL

后端 未结 17 2265
离开以前
离开以前 2020-11-22 09:25

Now that .NET v3.5 SP1 has been released (along with VS2008 SP1), we now have access to the .NET entity framework.

My question is this. When trying to decide betwee

17条回答
  •  半阙折子戏
    2020-11-22 10:03

    There are a number of obvious differences outlined in that article @lars posted, but short answer is:

    • L2S is tightly coupled - object property to specific field of database or more correctly object mapping to a specific database schema
    • L2S will only work with SQL Server (as far as I know)
    • EF allows mapping a single class to multiple tables
    • EF will handle M-M relationships
    • EF will have ability to target any ADO.NET data provider

    The original premise was L2S is for Rapid Development, and EF for more "enterprisey" n-tier applications, but that is selling L2S a little short.

提交回复
热议问题