IT评测·应用市场-qidao123.com技术社区
标题:
EDP .Net开发框架--自动化日志
[打印本页]
作者:
用多少眼泪才能让你相信
时间:
2024-5-21 19:06
标题:
EDP .Net开发框架--自动化日志
平台下载地址:
https://gitee.com/alwaysinsist/edp
自动化日志不需要额外调用日志相关功能即可无感实现步伐集方法调用的日志纪录。
创建业务逻辑处理类
public class StudentBLL : BusinessLogicBase
继承基类BusinessLogicBase< T >
界说业务逻辑方法
点击查看代码
[AutoLog(ActionEnum.Insert, "学生信息")]
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方法。
查看操纵日志
双击行查看详细信息。
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
欢迎光临 IT评测·应用市场-qidao123.com技术社区 (https://dis.qidao123.com/)
Powered by Discuz! X3.4