NLayers Introduction

NLayers Introduction

In this article I would like to introduce a layering framework named NLayers. This article is intended for experienced developers or architects with a good understanding of ASP.NET and the ADO.NET Entity Framework.


What is NLayers?

NLayers is a Visual Studio 2010 solution template for ASP.NET and the ADO.NET Entity Framework with the following projects connected in a layered architecture.

  • Presentation Logic Layer
  • Business Logic Layer
  • Data Access Layer

Additional to this it includes a wrapper base class for all basic Data Access operations and an Instance Manager for managing instance reuses. So this could be called as a framework along with a template.


The framework can be downloaded from CodePlex.


Use the Download button on the right side to get the NLayers.msi file.


Execute the MSI file, choose the installation folder and click "Next" to complete the wizard. There will be a series of command lines executed for copying the templates and running the installation commands.


After the installation, open the Visual Studio to view the NLayers installation.

Inside Visual Studio Adding Solution

Inside Visual Studio use the File -> New Project to get the dialog box. You can see NLayers ASP.NETApplication template from the NLayers group as shown below.


On creating the project template we will see the Solution Explorer as given below.


Please make the NLayers1.Web as the startup project if it is not.

Inside Visual Studio Adding Items

For adding items, use the Add Item dialog from the respective project.


For example

NLayers Business Logic Class should be added to NLayers.BusinessLogic project.

NLayers Data Access Class should be added to NLayers.DataAccess.Implementation project.

NLayers Data Access Interface should be added to NLayers.DataAccess.Interface project.


Apart from this article, you can get the official documentation of NLayers from:




In this article we have explored the NLayers framework. I would like to know about any comments or problems you are facing regarding the framework. I will be adding more articles on NLayers to help developers understand better the concepts and usage.