• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2640
  • Last Modified:

Advantages of LINQ?

Experts,

I'm new to LINQ like most people and can see its utility when it comes to smaller query jobs where a stored proc isn't needed.  Beyond that, I'm not sure what advantage it offers.  How easy is it to create re-useable LINQ?  How has the advent of LINQ affected database application design overall?

Thanks in advance for your input.
0
NigelRocks
Asked:
NigelRocks
  • 3
  • 2
2 Solutions
 
Éric MoreauSenior .Net ConsultantCommented:
LINQ is more then LINQ to SQL.

I love LINQ to objects. It allows me to filter/sort/... structures that don't offer those features otherwise (like arrays and collections).

I love LINQ to XML. XML document is a pain.
0
 
NigelRocksAuthor Commented:
Right.  Using it over an array is probably pretty useful.

What about reusability?

0
 
Éric MoreauSenior .Net ConsultantCommented:
I don't understand your concern on reusability!
0
 
NigelRocksAuthor Commented:
I don't want to have to write the same code over and over.  Embeded SQL has always had that problem, while stored procs and UDFs provided for modular, reusable code.  The only way I've seen that LINQ can do that is building dynamic LINQ functions.  Are there other ways?
0
 
Éric MoreauSenior .Net ConsultantCommented:
You are talking about LINQ to SQL again. This is the area of LINQ that I don't like. I am of the old-school that likes to have a business layer (filled by whatever method you like). Once your data is in your BL, chances are that this layer provides collections and other structures, LINQ is perfect on them.

I stay away from LINQ to SQL for real application whenener it is possible. It is wonderful in demo.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now