Back to list
Views:   16.1K
Replies:  2

Linq To Sql vs Entity Framework vs Ado.Net sqlserver

Can somebody please explain the benefits/drawbacks of L2S, Entity Framework and Ado.Net Sqlserver? I was looking at LingToSql and it looks like a ton of mapping and I thought L2S was supposed to speed that process up but it looks like you have to do another mapper on class on top of the 3 you already have to do. Entity Framework also has a mapper class which is time consuming. I want to use this design for the N-Tier architecture but there is so much mapping that the other developers here are complaining how slow it is and don't see the benefits. From what I can see they are all time consuming.

Dennis Tucker, Jun 07, 2012
Reply 1

For either L2S or EF, the only reason you would needed a mapper is if you don't want to reference the System.Data.Entity assembly in your UI project.  There are pros and cons to this. 

  • No mapping
  • business object models are generated for you by ORM


  • System.Data.Entity - some teams don't want this in their UI

  • mapping is necessary


If you use the DbContext for EF you can use common POCO's and then no mapping is necessary.

You can watch a video where I build an application with this pattern from scratch.

It's a thought.

King Wilder

King Wilder, Jun 11, 2012
Reply 2

LinqToSQL will give you a fast way to get started with an ORM but is limited to 1 to 1 mappings.

You should plan to map the CRUD objects into domain objects and pass those objects around in your application.

Following that logic, subsequent investigations will lead you to the Entity Framework as it is more flexible and so gives you more options including support for mapping your CRUD interface into a domain model.

Read this:

Avoid binding your UI to your database.

The benefits of doing so far out weigh the costs. 
Niall Finlay, Jun 11, 2012
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.