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

去掉UserModel #99

Merged
merged 2 commits into from
Nov 6, 2024
Merged

去掉UserModel #99

merged 2 commits into from
Nov 6, 2024

Conversation

codekgithub
Copy link
Contributor

@codekgithub codekgithub commented Nov 5, 2024

带着UserModel时,post json格式报错(“添加失败!用户名不能为空! (Parameter 'Name')”)。
调整了下EntityModelBinder

@nnhy
Copy link
Member

nnhy commented Nov 5, 2024

带有 UserModel,是为了在添加和修改对象时,以 UserModel 对象来接收数据。
然后再查找User并把属性字段拷贝过去。

由于User带有扩展属性,日渐复杂,用它作为Add/Edit接口参数来接收数据不太合适。
所以慢慢朝着DTO方向发展,也就是 UserModel。

临时解决方案可以去掉 UserModel,但最后还是要找到原因,为什么使用UserModel就会报错。

@nnhy nnhy merged commit 024280c into NewLifeX:master Nov 6, 2024
0 of 2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants