Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoMap改进 #27

Closed
CodeBearJin opened this issue Jun 13, 2018 · 1 comment
Closed

AutoMap改进 #27

CodeBearJin opened this issue Jun 13, 2018 · 1 comment

Comments

@CodeBearJin
Copy link

CodeBearJin commented Jun 13, 2018

这是现在的代码
image
我觉得可以改成
image
先尝试进行map,如果失败了,才进行下面的动作

@UtilCore
Copy link
Contributor

这里的try catch比较复杂,因为automapper在很多情况下会抛出异常,代码结构暂时这样,有单元测试保障基本的正确性。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants