Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

L2S (LINQ to SQL) or EF (Entity Framework)

I'm going to rebuilt an existing moderate-scale web-app to be used for a supply-chain-management web-solution. The core would be around some Item\Site combination-records, Organization\User management, display Organization specific data (a dashboard with 2 levels of Grid) and a Drilldown which has some complex calculations for Item transactions and a robust Grid to show multiple level of totals, sub-totals, etc...

In past, I had developed it using ASP.Net 2.0 and ADO.Net, the backend is SQL-Server. I'm suppose to migrate this web-solution to a full fiedge ASP.Net v3.5 based MVC architecture and integrate other pieces like Membership API, Validation-framework, etc... its going to be a complete re-design. The performance and scalability (i.e. handle millions of records, perform quick calculations, quick-response-time, etc..) are the two main priorities. In addition simplicity and long-term maintenance and periodic upgrades at any level are also to be considered.

I was wondering which of the following two would make a robust DAL which meets my above mentioned requirements:

  • L2S (LINQ to SQL) or EF (Entity Framework)

I've been searching a lot and based on that I'd like to verify my understanding:

  1. Is L2S like Win98 - strong, stable, simple and performing and -
  2. Is EF something like WinXP - better then win98, also stable in a way but somewhat more layers so might have a diff in performance and simplicity compared to L2S

I don't think we're going to involve 'multiple-databases' in our development, SQL-Server will stay. Also, I don't think we'll need to actually map multiple-tables to an Entity, etc... Generally, we'll have one to one mapping for our DB-tables to Entities (i.e. User, Org, etc..) and for some complex cases - like the dashboard fetches records from multiple tables (most probably we'll need to use a stored-procedure and/or a DB VIEW). The Drilldown page fetches data from a single table but has many calculations so again we're planning to usa a stored-procedure which will provide us a formatted table (but this table might not look like the ones already present in DB)

So, thats some tricky mapping but apart from that we need to keep things simple, consider performance and scalability. Oh! and last but not the least - we've a tight deadline so its a kind of 'fast-track' development.

Simple, fast, scalable & performing - thats what we need!

Thanks in advance - please guide me.

PS: Ref links: ORM-LINQ-Entity-Framework-Eric-Nelson

Discuss - LINQ to SQL vs. ADO.NET Entity Framework

Short - ADO.NET Entity Framework When To Use It Vs Linq To SQL

Details - Choosing between ADO.NET Entity Framework and LINQ to SQL

List - Choosing between LINQ to SQL and Entity Framework

like image 898
Hemant Tank Avatar asked Feb 28 '23 01:02

Hemant Tank


2 Answers

I like the comparrison of L2Sql as Win98, but I would compare the EF to Vista ... it's got lots of power potentially but bits left undone until they came out with the next version make it like a death of a thousand cuts.

I am looking foward to the EF 4 ... I am hoping it is Windows 7 to stay with your analogy.

like image 167
Daniel Elliott Avatar answered Mar 17 '23 05:03

Daniel Elliott


I don't think you can go wrong with Linq to sql. It has it's quirks but it works. We decided to go with L2S even though there are issues with using multiple data contexts.

For fast DAL generation check out plinqo It requires Codesmith to generate the code but it can do a lot and addresses some of the quirks linq to sql has. Also there is Oleg Sych T4 templates which is free and built into VS2008.

like image 32
nportelli Avatar answered Mar 17 '23 06:03

nportelli