一、在DZ_Portal.App项目中的BLL文件夹下创建一个类:AnnouncementDAL.cs,代码如下:

FastSpring学习笔记四(BLL层类创建和DAL层类创建)using System;
FastSpring学习笔记四(BLL层类创建和DAL层类创建)
using System.Collections.Generic;
FastSpring学习笔记四(BLL层类创建和DAL层类创建)
using System.Text;
FastSpring学习笔记四(BLL层类创建和DAL层类创建)
using FastSpring.Base;
FastSpring学习笔记四(BLL层类创建和DAL层类创建)
using DZ_Portal.App.DAL;
FastSpring学习笔记四(BLL层类创建和DAL层类创建)
using DZ_Portal.App.Model;
FastSpring学习笔记四(BLL层类创建和DAL层类创建)
using Spring.Transaction.Interceptor;
FastSpring学习笔记四(BLL层类创建和DAL层类创建)
using FastSpring.Exceptions;
FastSpring学习笔记四(BLL层类创建和DAL层类创建)
FastSpring学习笔记四(BLL层类创建和DAL层类创建)
namespace DZ_Portal.App.BLL

 

二、在文件夹DAL下创建类:AnnouncementDAL.cs,代码如下:

FastSpring学习笔记四(BLL层类创建和DAL层类创建)using System;
FastSpring学习笔记四(BLL层类创建和DAL层类创建)
using System.Collections.Generic;
FastSpring学习笔记四(BLL层类创建和DAL层类创建)
using System.Text;
FastSpring学习笔记四(BLL层类创建和DAL层类创建)
using FastSpring.Base;
FastSpring学习笔记四(BLL层类创建和DAL层类创建)
using DZ_Portal.App.Model;
FastSpring学习笔记四(BLL层类创建和DAL层类创建)
FastSpring学习笔记四(BLL层类创建和DAL层类创建)
namespace DZ_Portal.App.DAL

 

到目前为止,我们已经把DZ_Portal.App项目所需要的类都创建好了,日后的所有有关类库的代码都是如此创建出不同的类,它们都是提供给网站应用程序所使用的基础,以后将不在陈述相关的东西,因为这部分的内容基本上都可以用工具自动生成代码的。编译这些代码需要引用下面的一些文件:FastSpring.Net、FastSpring.Net.Common、FastSpring.Net.Core、Spring.Core、Spring.Data、Spring.Data.NHibernate12

原创作品出自努力偷懒,转载请说明文章出处http://blog.csdn.net/kfarvid或 http://www.cnblogs.com/kfarvid/

相关文章: