Click here to Skip to main content
15,881,669 members
Articles / Web Development / ASP.NET

Monorail Hands-On

Rate me:
Please Sign up or sign in to vote.
4.78/5 (15 votes)
19 Feb 2008CPOL9 min read 71.2K   1.1K   40  
In this article, I will present a sample application using the Monorail framework and provide the basic concepts of the design pattern known as MVC.
namespace Northwind_Monorail
{
	using System;
	using System.Web;
	
	using Castle.ActiveRecord;
	using Castle.ActiveRecord.Framework.Config;

    using Northwind_Monorail.Models;
	

	public class GlobalApplication : HttpApplication
	{
		public GlobalApplication()
		{
		}

		public void Application_OnStart()
		{
            ActiveRecordStarter.Initialize(ActiveRecordSectionHandler.Instance,
                                           new Type[] { typeof(Supplier), typeof(Product) });

			// If you want to let ActiveRecord create the schema for you:
			// ActiveRecordStarter.CreateSchema();
		}

		public void Application_OnEnd() 
		{
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Instructor / Trainer Alura Cursos Online
Brazil Brazil

Comments and Discussions