NStarfaiNet 框架的使用示例(二)
在 NstarfaiNet 框架的使用示例(一)中已经对使用NStarfaiNet的应用框架的DAO和BLL做了简单的介绍。以下将继续对BLL进行补充说明,并示范生成的Model实体代码内容。
BLL: 自动生成的业务类代码不宜手动修改(如添加一些业务方法等),这样做是为了避免将来重新生成代码覆盖了自己添加的内容。开发者可以按照模块或者功能划分,手工添加一个新的BIZ业务类来处理其他业务逻辑。
Model:
此处以测试表bsi_test为例
BLL: 自动生成的业务类代码不宜手动修改(如添加一些业务方法等),这样做是为了避免将来重新生成代码覆盖了自己添加的内容。开发者可以按照模块或者功能划分,手工添加一个新的BIZ业务类来处理其他业务逻辑。
1
/*
2
版权所有:版权所有(C) 2007 NStarfaiNet框架设计者
3
模块名称:NStarfaiNet.Test.BLL
4
完成日期:2006-08-20
5
设计作者:刘斌[liubin]
6
内容摘要:BaseBLL 的摘要说明。
7
*/
8
using System;
9
using System.Data;
10
using System.Runtime.Remoting.Messaging;
11![]()
12
using NStarfaiNet.Test.Dao;
13
using NStarfaiNet.Access.Interface;
14
using NStarfaiNet.Test.Model.Interface;
15![]()
16
namespace NStarfaiNet.Test.BLL
17
{
18
/// <summary>
19
/// 业务基类
20
/// </summary>
21
public class BaseBLL
22
{
23
自动生成代码
82
}
83
}
84![]()
/*2
版权所有:版权所有(C) 2007 NStarfaiNet框架设计者3
模块名称:NStarfaiNet.Test.BLL4
完成日期:2006-08-205
设计作者:刘斌[liubin]6
内容摘要:BaseBLL 的摘要说明。7
*/8
using System;9
using System.Data;10
using System.Runtime.Remoting.Messaging;11

12
using NStarfaiNet.Test.Dao;13
using NStarfaiNet.Access.Interface;14
using NStarfaiNet.Test.Model.Interface;15

16
namespace NStarfaiNet.Test.BLL17
{18
/// <summary>19
/// 业务基类20
/// </summary>21
public class BaseBLL22
{23
自动生成代码82
}83
}84

Model:
此处以测试表bsi_test为例
1
/*
2
版权所有:版权所有(C) 2007 NStarfaiNet框架设计者
3
模块名称:NStarfaiNet.Test
4
完成日期:2006-08-20
5
设计作者:刘斌[liubin]
6
内容摘要:BsiTestEntity 的摘要说明。
7
*/
8
using System;
9
using NStarfaiNet.Access.Interface;
10
using NStarfaiNet.Test.Model.Interface;
11![]()
12
namespace NStarfaiNet.Test.Model
13
{
14
/// <summary>
15
/// NStarfaiNet 测试实体类
16
/// </summary>
17
[TableAttribute(TableName="bsi_test")]
18
public class BsiTestEntity : BaseEntity,IBsiTestEntity
19
{
20
自动生成代码
64
65
}
66
67
}
68![]()
69![]()
实体接口类:
/*2
版权所有:版权所有(C) 2007 NStarfaiNet框架设计者3
模块名称:NStarfaiNet.Test4
完成日期:2006-08-205
设计作者:刘斌[liubin]6
内容摘要:BsiTestEntity 的摘要说明。7
*/8
using System;9
using NStarfaiNet.Access.Interface;10
using NStarfaiNet.Test.Model.Interface;11

12
namespace NStarfaiNet.Test.Model13
{14
/// <summary>15
/// NStarfaiNet 测试实体类16
/// </summary>17
[TableAttribute(TableName="bsi_test")]18
public class BsiTestEntity : BaseEntity,IBsiTestEntity19
{20
自动生成代码64
65
}66
67
}68

69

1
/*
2
版权所有:版权所有(C) 2007 NStarfaiNet框架设计者
3
模块名称:NStarfaiNet.Test
4
完成日期:2006-08-20
5
设计作者:刘斌[liubin]
6
内容摘要:BsiTestEntity 的摘要说明。
7
*/
8![]()
9
using NStarfaiNet.Access.Interface;
10![]()
11
namespace NStarfaiNet.Test.Model.Interface
12
{
13
/// <summary>
14
/// NStarfaiNet 测试表实体接口。
15
/// </summary>
16
public interface IBsiTestEntity : IEntity
17
{
18
自动生成代码
29
}
30
}
31![]()
32![]()
/*2
版权所有:版权所有(C) 2007 NStarfaiNet框架设计者3
模块名称:NStarfaiNet.Test4
完成日期:2006-08-205
设计作者:刘斌[liubin]6
内容摘要:BsiTestEntity 的摘要说明。7
*/8

9
using NStarfaiNet.Access.Interface;10

11
namespace NStarfaiNet.Test.Model.Interface12
{13
/// <summary>14
/// NStarfaiNet 测试表实体接口。15
/// </summary>16
public interface IBsiTestEntity : IEntity17
{ 18
自动生成代码29
}30
}31

32




浙公网安备 33010602011771号