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/3/2009 8:40 PM
 


I am new to DNN and decided to chose it as a framework for my large web project. Now I am going though module development tutorials to get up to date on the technology before I start development.   Most documents on DNN include tutorials on how to use DAL and DAL+, however my understanding that LINQ to SQL did not exist then when tutorials came out that is why it is not really included and DAL is  emphasized.

 

I used LINQ to SQL in my other project where I build web from scratch and it seemed to work well and much faster to develop and nice to have ER model.   Looks like I can use it easily in DNN as well.

 

 I was wondering if it using LINQ to SQL will be a better option over DAL in DNN.   Looks like even DAL is pretty involved as far as development and LINQ_SQL seem to take less time and more robust but may be there hidden rocks that I am not seeing.   Any suggestion on pros and cons of using LINQ  over DAL you have experienced?

 

Thanks for suggestions and advices.  

 
New Post
9/3/2009 10:28 PM
 

Hi. I haven't used LINQ to SQL in any of my modules (although I have considered it). It would probably be faster in performance as well as development since you don't really need to write a dataProvider for sql from the ground up unless you wanted to include dataProvider validation before/after sending it to the database. It is something I might consider using down the line here. The main issue is that the objectQualifier setting in web.config wouldn't be honored by linq to sql classes and would prevent you from ever installing more than 1 DNN installation in the same database. Some people might not care about this since they are only going to use a single install anyways, but I would always play it safe and code for the possibility anyways. There is a dnn linq to sql adaptor somewhere on codeplex. If you want to read more, go to this website: http://dotnetnuke.adefwebserver.com/DotNetNuke/tabid/195/Default.aspx and look for the section called "Connecting your module to the database". It covers linq and the dnn linq adaptor. My only problem is sending a custom object like a Headline, Event, Venue or Testimonial through the linq to sql class methods. Guess I will have to expirament and see how complex it will get.

 
New Post
9/4/2009 5:47 PM
 

Looks like new DNN Linq adapter  alows use of objectQualifiers so that solve that concern.  I am just a beginner with DNN, do I really need to use objectQualifier if I develop one instance and not for distribution ?

 
New Post
9/4/2009 7:13 PM
 

The objectQualifier is only used to separate multiple instances of DNN in a single database. It is mainly used to support shared hosting environments where you are given a single SQL database to work with. It is not required for a single installation of DNN or if you use separate databases in SQL server.

If you are developing modules for others, especially for sale, you should support objectQualifier in all of your code..

I hope this is of some help to you.


Dwayne J. Baldwin
 
New Post
9/4/2009 7:43 PM
 

If you are only going to use a single install for each database, then the objectQualifier doesn't make any difference, just use linq to sql normally, otherwise use the dnn linq adaptor.

 
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