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

执行SQL语句的方式 建议改成EF提供的ExecuteSqlRawAsync方法 #132

Open
l2999019 opened this issue Nov 11, 2024 · 4 comments
Open

Comments

@l2999019
Copy link
Contributor

我看大佬提供的库里面 是通过EF获取连接对象 然后转而用ADO.NET原生的ExecuteNonQuery方法执行的SQL
但是这样会导致EF提供的DbCommandInterceptor 拦截器 无法正常拦截到相关的SQL语句
可能会导致忽略执行拦截器中的相关业务代码.
采用ExecuteSqlRawAsync 则不会有这个问题,拦截器能正常获取SQL并执行相关逻辑

@yangzhongke
Copy link
Owner

yangzhongke commented Nov 11, 2024

谢谢,已经合并。
等下次发布新版本的时候会包含。

@l2999019
Copy link
Contributor Author

感谢,下个版本大概什么时候发布? 因为我们的项目已经遇到了类似的问题.. 😂~~

@yangzhongke
Copy link
Owner

yangzhongke commented Nov 11, 2024

你们用什么数据库?哪个.NET版本?

@l2999019
Copy link
Contributor Author

我们用的mysql数据库和达梦数据库 .NET5.0版本

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