Saturday, July 31, 2010
  Search
 
Register
Login
 
Getting Started with Code Endeavors Ajax Compiled Module Template
DotNetNuke Ajax development just got easy thanks to Jon Henning and his Ajax Compiled Module templates. He’s got them listed on CodePlex, they’re updated for DNN 5, and they are available in C# and V...

Find this article and more in the category

Read This Article . . .

Dude, Where’s my web.config file? Resolve Installation DNN Error Message: BC30451: Name 'Config' is not declared
Sometimes troubleshooting DNN errors can be a royal pain. Fortunately, if you know what you're looking for installation errors are usually pretty easy to resolve. Unfortunately, if you don't know wha...

Find this article and more in the category

Read This Article . . .

Creating new DotNetNuke HTTP Alias Records
 Setting up DotNetNuke to handle serving requests for Portal Alias records is a breeze. You can use these records to direct your site to handle requests for multiple domain names to one website with ...

Find this article and more in the category

Read This Article . . .

How to Use the DNNLabelEdit Control
 It's easy to use the DNNLabelEdit control, you know the one you mouse over and edit in place? Yeah, that one. In just a few minutes, you can begin using the control on your sites as well for full on...

Find this article and more in the Module Development category

Read This Article . . .

Getting Aquainted with the DNN Classes
 So, you've decided to start checking out DotNetNuke development and you're wondering where to start, right? Well, it's easy to start taking a quick tour of the DotNetNuke classes now with the help o...

Find this article and more in the category

Read This Article . . .

Quick Look at Some New Features of DotNetNuke 5 Cambrian
DotNetNuke’s much anticipated Cambrian has finally been made available as a Release Candidate and while it looks like the same ol’ packages from afar, it’s packed with some nice new features that are...

Find this article and more in the category

Read This Article . . .

New "Styles" SkinObject Found in DotNetNuke 4.9
One more addition has been added to the developer's DotNetNuke skinning toolbox with the release of DotNetNuke 4.9. Introducing...the Styles SkinObject. This little object is a very welcome addition ...

Find this article and more in the DotNetNuke category

Read This Article . . .

How To Customize the Privacy and Terms Links on Your DotNetNuke Portal
Straight out of the box, DotNetNuke already has a lot of things covered. But, what do you do when you are ready to begin customizing your site. Sometimes, it’s not so easy to figure out how to make t...

Find this article and more in the category

Read This Article . . .

More Ways to Install DotNetNuke Modules with the URL Method
While DotNetNuke has a built in mechanism for installing modules, there is another method you can use as well. This is a great alternative to use especially when you are trying to install larger mod...

Find this article and more in the category

Read This Article . . .

Upgrading to DotNetNuke Cambrian 5.0 from DotNeNuke 4.x
If you're looking to try out the new DNN Cambrian package, you can upgrade previous DotNetNuke installations with the following steps. Remember, as of right now, the DNN 5.0 Cambrian package availabl...

Find this article and more in the category

Read This Article . . .

Recently Added Articles

Minimize
Article List

 

Generate a Module Data Access Layer With CodeSmith

10/28/2008 2:39:44 PM - By Briana Tarrance

Category: DotNetNuke | | Comments 0

 

 

Related Links

After you have downloaded and installed the freeware version of CodeSmith and downloaded and unzipped the UPDATED & ENHANCED templates, you'll need to import the templates into CodeSmith.

Click the Browse for Folder icon and navigate to the folder where you have unzipped the CodeSmith templates and hit OK.  A folder will be created for you in CodeSmith and named based upon the template holding folder. You can right click on the folder node to rename it whatever you want. 

 
 
To create the Controller Classes you'll need for custom module, double click on the Controller Class template. A new screen will open up as shown below. Click on the ellipses in the Source Table row to create a connection to your database where the tables for your module can be found.
 
 
In the Table Picker Screen, again click on the ellipses to create a connection to your database.
 
 
 
Click on OK and it will be displayed in your list of current connections. Once you see your connection in the window, hit Close and your database tables will be displayed to you.
 
 
 
Select a table that you want to create a controller class for and either double click or highlight and click Select. Then fill in the options on the Generator Screen and don't forget to update your namespace or you'll have to modify each class by hand. After you are satisfied with your options, click the Generate button on the bottom and you're generated code will be displayed to you in the right hand side of the window.
 
 
Click the Save icon and name your new file accordingly...and don't forget to save with the ".vb" extension.
 
 
Now, you can repeat the process with the Info Template. Then, to top it all off, you can run the Sql Stored Procedures template and CodeSmith will create the SQL file that you can distribute with your module. The template will even generate the file using the {databaseOwner}{moduleQualifier} tokens required. That's it!
 

Download Related Files Here or on the Downloads page: 

DNN 4.x Templates          Download

 

 

CodeSmith DNN DAL IHydratable Templates (VB.Net + SQL) Download

 
 
Copyright 2008 by Virtual-Essentials.com Privacy Statement    Terms Of Use