Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...LINQ To SQL vs.  DNN DAL LINQ To SQL vs. DNN DAL
Previous
 
Next
New Post
9/9/2009 8:34 PM
 

What is the best way to write data sources for modules now a days? linq or entity framework? If linq, I am having an issue with a linq to sql query trying to get a random row from the table. If entity framework, I have issues with some of its design. I.e. the clause "like" only compares string values. Think linq to entities would work better than the traditional entity framework?

 
New Post
9/11/2009 9:08 AM
 

With respect to which ORM framework is best, if you ask ten people you'll likely get ten different answers.  There are certainly advantages (and disadvantages) to most of the mainstream choices (L2S, EF, or NHibernate -- although I'm not sure how much NHibernate action there has been with DotNetNuke).  For a small and streamlined module, L2S does offer a lot of attractive characteristics (I wrote about this at great length over at SDN earlier this year).

That said, I've always been a fan of using L2E on top of EF.  In my opinion, its final expressed representation is much closer to the actual author's intent.  

Brandon


Brandon Haynes
BrandonHaynes.org
 
New Post
9/11/2009 5:06 PM
 

Eventually, Microsoft will replace Linq to SQL ORM with Entity Framework. If you want to learn something new and stick with it for the long run, learn Entity Framework. Visual Studio 2010 should come with the next version of EF. I don't believe there are updates to L2S if MS is planning to abandon it.

However note the two are pretty similar and you can easily migrate your L2S skills to EF.

Also I like hand coding SQL and L2S abstracts that from me. L2S becomes like a blackbox. You're not sure what SQL is being sent to the database and I have heard stories that L2S sometimes created unoptimizerd SQL or even Bad SQL. Eventually it doesn't really matter.


Free DNN 5.2 hosting at FreehostingWithSitebuilder.com
Lots of extra modules and skins - Your domain name or ours
 
New Post
9/11/2009 6:39 PM
 

Tony Barken wrote

Eventually, Microsoft will replace Linq to SQL ORM with Entity Framework. 

Eventually, Microsoft will replace the Entity Framework with something else (and judging from Microsoft's track record with the data layer, that will be sooner rather than later).  There is rarely a "long run" in this area.  L2S has a solid enough future that it remains appropriate in many circumstances.  See this interview with Tim Mallalieu for more details about its future.

In my opinion, the days of hand-optimized SQL are waning (perhaps to be resurrected as the trend again reverses).  Time will tell if I'm right on that count.

Hope this helps!

Brandon


Brandon Haynes
BrandonHaynes.org
 
New Post
9/11/2009 6:52 PM
 

Brandon Haynes wrote
 

In my opinion, the days of hand-optimized SQL are waning (perhaps to be resurrected as the trend again reverses).  Time will tell if I'm right on that count.

You're too nice Brandon :)

I will go on the record and say that after using Linq to SQL on large (bring the server to it's knees thousands of transactions a minute) projects it's just as good as stored procedures.

The quality and performance of the SQL hitting the server is MUCH better than hand written stored procedures.

I have trained nearly a dozen developers I worked with in it over the past year, and once exposed to it never want to go back and wonder how they lived without it.

The development time savings is 50-70%+

Download ADefHelpDesk (http://ADefHelpDesk.com) and enter a few thousand records and test the performance if you need an example...



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...LINQ To SQL vs.  DNN DAL LINQ To SQL vs. DNN DAL


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out