Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need opinions on old school vs. LINQ and EF
Message
General information
Forum:
ASP.NET
Category:
LINQ
Miscellaneous
Thread ID:
01497565
Message ID:
01497696
Views:
57
>>It's really a non-decision. EF is the way Microsoft is pushing and will get more resources and attention over time, compared to LINQ.
>
>Craig, it's worse than that. The manager wants to only use ADO.NET (command objects, datareaders, datasets, datatables, datarows) instead of LINQ or EF. See Bill Fitzgerald's post below who takes my managers side.
>
>Basically, most of what we do is get data from either flat files or from FoxPro or SQL tables and we beat that data up in VFP using a lot of SQL Selects into cursors and more cursors and join those cursors and spit out flat files or PDF reports.

Write a very simple query and then display out the fields (make sure you've got a number of different types - date/time, ints, etc) using DataSets, Referencing and correctly casting fields to the correct type is tedious and error prone with DataTables, if you're not using any other types of wrappers to project them into a typed object. Then do the same thing using EF. It should be easy to see how much easier it is to EF as compared to DataSets/DataTables.

Just being able to project the results into a type is huge. If you then need to run subqueries on the results, EF via LINQ makes things MUCH simpler. And if you really want to use stored procs or direct SQL, you can (there isn't anything stopping you from doing that in EF).

There is a learning curve either way, why not pick the way that will be continued to be evolved?

I've used gone the standard DA route - direct to DataSets/DataTables, then to a simple object wrapper on top of a row in a DataTable, LINQ to SQL, and now EF. While LINQ to SQL is easier to get running "out of the box", the latest version of EF has a lot of nice features (and isn't that much more complex to get up and running with). I wouldn't have switched if I thought the new way was worse than the old way.

Do you only use SEEK and LOCATE in your apps? Or are you using SQL as well? Did they complain about switching to SQL because it was "so hard to learn"? Would they want to give it up (assuming they are using it)? I feel the same way about LINQ, and L2S/EF.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform