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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0To DAL or not to DAL, that is my question!To DAL or not to DAL, that is my question!
Previous
 
Next
New Post
10/17/2006 9:31 AM
 
Thanks everyone for your replies.  The data access layer I use is just too easy to give up!  I can do things like:
LinkRow row = new LinkRow();
row.Link = "www.bla.com";
row.Name = "bla.com";
ModuleDB db = new ModuleDB();
db.BeginTransaction();
db.LinkTable.Insert(link);
int id = link.LinkID;
db.CommitTransaction();
or
LinkRow[] rows = db.LinkTable.GetAsArray("moduleid=55", "DispalyOrder");
DataTable dt = db.LinkTable.GetAsDataTable("moduleid=55", "DispalyOrder");
or
db.StoredProcedures.ProcessExpiredLinks();

And the best part is that whenever I change the DB, I just regenerate the DAL with MyGeneration.

My layer is abstracted to support multiple server types easily.  However, it does not support multiple instances for different databases in the bin folder.
The user will have to overwrite the SQL version of the layer dll with an oracle version of the layer dll.  From what everyone is saying, this seems to be acceptable.

Thanks everyone!
Mike
 
New Post
10/17/2006 10:35 AM
 
AdefWebserver wrote

 msant7 wrote
Why go through the trouble...

If you use the DAL+ you are making things easier on yourself. Using the DAL+ requires less code than coding the data acess methods manually.

All you need is code like this:

Public Shared Function ThingsForSale_SelectAll(ByVal ModuleId As Integer) As List(Of ThingsForSaleInfo)
    Return CBO.FillCollection(Of ThingsForSaleInfo)(CType(DataProvider.Instance().ExecuteReader("ThingsForSale_SelectAll", ModuleId), IDataReader))
End Function

and you're are connected to the database and you have a set of records. No need for an abstract data provider, no need for a concrete data provider, no need to set connection properties to the database.

AND you can still support multiple databases (like Oracle). (You have to be careful and use only simple stored procedures to support multiple databases)

From what I have been reading in the Core forums, they are re-coding many of the instances that are using the CBO fill methods to eliminate the use of reflection.  Some of the core module developers are doing the same.

It seems to me the use of this method should take into count the performance requirements of you module and site.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0To DAL or not to DAL, that is my question!To DAL or not to DAL, that is my question!


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