linq to sql继续错误

发布于 2024-09-29 22:14:13 字数 145 浏览 0 评论 0原文

当我尝试执行 SubmitChanges() 时,我在 linq 查询上遇到错误,

问题是我现在在项目中尝试执行的操作是 同样的错误(我猜 linq 仍然尝试进行错误更改)

我如何清理待处理的更改或以其他方式处理该问题?

谢谢!

i had an error on a linq query when i tried to do SubmitChanges()

the problem is that what ever i try to do in my project now i'm getting the
same error (i guess the linq still tring to do the Error Change)

how can i clean the pendding changes or deal with that issue otherwise?

Thanx!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

找回味觉 2024-10-06 22:14:13

您需要将它们从“队列”中删除。

最简单的就是调用GetChanges,并反向执行所有操作。例如,插入变为删除等。

这里是我写的一个扩展方法适用于简单的情况(根据需要修改它)。

You need to remove them from the 'queue'.

The simplest is just the call GetChanges, and do all the actions in reverse. Eg, Inserts becomes deletes, etc.

Here is an extension method I wrote that works for simple cases (modify it as you want).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文