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

达梦8数据库,Insert新增方法bug #1759

Open
zgmqdl opened this issue Mar 24, 2024 · 5 comments
Open

达梦8数据库,Insert新增方法bug #1759

zgmqdl opened this issue Mar 24, 2024 · 5 comments

Comments

@zgmqdl
Copy link

zgmqdl commented Mar 24, 2024

问题描述及重现代码:

var rows = await _freeSql.Insert<Model>(entity).ExecuteInsertedAsync();

这个方法的返回值里面没有返回插入的实体Id

数据库版本

DM8

安装的Nuget包

.net framework/. net core? 及具体版本

.Net core7

@zgmqdl
Copy link
Author

zgmqdl commented Mar 24, 2024

mysql也有这个问题

@2881099
Copy link
Collaborator

2881099 commented Mar 24, 2024

看同步方法的注释

ExecuteInsered

@zgmqdl
Copy link
Author

zgmqdl commented Mar 25, 2024

好的,看到了。“注意:此方法只有 Postgresql/SqlServer 有效果” 那达梦或者mysql有没有替代的方法

@2881099
Copy link
Collaborator

2881099 commented Mar 26, 2024

没有,mariadb 可以,mysql 不行。

@luoyunchong
Copy link
Collaborator

可以使用仓储的方法,会回填id

https://freesql.net/guide/repository.html

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

3 participants