比如:1)BusLogic.BillService.Insert(BillInfo info,out string errorMessage)2)BusLogic.BillService.Insert(BillInfo info){ if ( info == null ) throw new Exception(errorMessage);}究竟我该采用那种设计呢?
2 回答

白猪掌柜的
TA贡献1893条经验 获得超10个赞
业务逻辑层:应该返回 errorMessage
当然如果是我的话,我会返回errorcode,然后有errorcode去对应resource中预先定义的错误信息,显示到页面上。
- 2 回答
- 0 关注
- 676 浏览
添加回答
举报
0/150
提交
取消