Building High-Performance modules in DNN6 with C# 4.0, LINQ2Entities, and Visual Studio 2010

By Andy Stephenson
November 2011

In this DotNetNuke training series we show you how to build High-Performance modules in DotNetNuke6 with .NET 4, LINQ2Entities, and Visual Studio 2010.

We will be covering the entire process from start to finish, including how to setup Microsoft Visual Studio 2010, connecting to the DotNetNuke database, implementing the module, how to design your module for future development and creating controller classes.

After completing the module, we show you how to take advantage of DotNetNukes caching features to vastly improve module performance and then we cover Visual Studio debugging techniques.

Finally we show you how to package your module for distribution. 

You will require the following software to complete this tutorial:
  • An installation of DotNetNuke 6.x
  • Microsoft Visual Studio 2010
  • .NET 4.0

You need to Subscribe as a member of DNN Creative Magazine and Login to access this tutorial.

Video 1 - Setting up DNN and Visual Studio

  • Introduction
  • System requirements
  • Cleaning up the DotNetNuke default website
  • Creating the empty ASP.NET web application
  • Setting the DotNetNuke bin folder
  • Creating the app_localresources folder
  • Adding a referance to the DotNetNuke.DLL file
  • Building the module folder structure
  • Creating the SQLDataProvider script files
  • How to configure build properties

Video 2 - Creating the Three Controls : View, Edit and Settings

  • Registering the module in DotNetNuke
  • Creating the View control
  • Configuring the view .ascx file
  • Adding classes
  • Introduction to the three main DotNetNuke module controls
  • Creating the Edit and Settings control
  • Configuring DotNetNuke to use these new controls

Video 3 - Implementing the Database

  • Creating a new table directly in the database
  • Creating the table fields
  • Setting the primary key
  • How to create the 'Create Table' SQL script
  • How to create the uninstall script
  • Creating the Entity Data Model to connect to the DNN database
  • Making a Linq2Entities model compatible with DotNetNuke

Video 4 - Implementing the Module

  • Creating a literal control to display information from the database
  • Creating an empty page load function
  • Creating the code to pull information from the database
  • How to give a module control over its pop up menu
  • Adding the 'Edit Content' link
  • Creating the edit control HTML
  • Instructing the module to use the pre determined DNN text editor
  • Creating the save and cancel buttons
  • How to create a DNN resource file for module localisation
  • Creating the edit control code
  • The edit page load code
  • The edit page save code

Video 5 - Designing for the Future: Creating Controller Classes

  • Creating the controller class
  • The HTML_Get procedure
  • The Update procedure
  • Editing the view page load code
  • Editing the edit page load code

Video 6 - Fast Lane Performance: Adding Caching and Debugging

  • Introduction to module caching
  • Benefits of the controller class
  • The Item_CacheKey method
  • Querying the DotNetNuke cache
  • Updating the DotNetNuke cache
  • How to debug the module code
  • Attaching a process
  • Verifying that the cache is working correctly

Video 7 - Packaging the module for release (Released December 22nd)

  • Setting the module version number
  • Removing the web.config files
  • Removing the DotNetNuke.web.dll file
  • Reviewing the install.xml file
  • Locating the install package
You are not logged in.
You must log in to access all 
650+ videos, tutorials, podcasts, and more.
RSS Feeds