旧书之城 发表于 2024-5-21 22:47:47

EDP .Net开发框架--自动化日志

平台下载地址:https://gitee.com/alwaysinsist/edp

自动化日志不需要额外调用日志相关功能即可无感实现程序集方法调用的日志记录。

[*]创建业务逻辑处理类
public class StudentBLL : BusinessLogicBase
继承基类BusinessLogicBase< T >
[*]定义业务逻辑方法
点击查看代码
public ResultModel<bool> AddStudent(StudentModel item, IDBInstance db = null) {
    //...
}ActionEnum:操作行为。
学生信息:当前操作业务对象的名称。ResultModel ret = new ResultModel();
创建通用返回对象。点击查看代码StudentModel item = new StudentModel();
item.Create();
ret.KeyValue = item.ID;实例化StudentModel业务对象。
调用业务对象Create()方法创建当前业务对象。
设置通用返回对象KeyValue值。

[*]调用业务逻辑方法
private readonly StudentBLL bll_Student = StudentBLL.Create();
创建StudentBLL类实例,通过Create方法创建可实现自动化日志。
var result = this.bll_Student.AddStudent(item);
调用AddStudent方法。
[*]查看操作日志

双击行查看详细信息。


来源:https://www.cnblogs.com/alwaysinsist/p/18190671
免责声明:由于采集信息均来自互联网,如果侵犯了您的权益,请联系我们【E-Mail:cb@itdo.tech】 我们会及时删除侵权内容,谢谢合作!
页: [1]
查看完整版本: EDP .Net开发框架--自动化日志