jinyong

平淡生活,努力工作

导航

使用ActiveRecord的三层构架及泛型例子

只是一个框架而已,关于ActiveRecord的开发,请参考terrylee的Castle开发相关文章。因为在进行开发框架封装的时候遇到了为了考虑简化而忽略了不同业务对象调用的问题,所以现在将UIBase补充了一个泛型参数,但是这样使得看起来要复杂得多。写出来想听听大家的意见!

using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication2
{
    
数据库访问层

    
业务层

    
界面层

    
/// <summary>
    
/// 测试。
    
/// </summary>

    class Program
    
{
        
static void Main(string[] args)
        
{
            UIBase
<model, Controller<model>> _base = new UIBase<model, Controller<model>>();

            Console.WriteLine(_base.GetCurrent());
        }

    }

}






posted on 2007-04-10 22:55  jy_kwwl  阅读(3216)  评论(20编辑  收藏  举报