我一直在互联网上进行搜索,但似乎找不到 awnser.DataContext 可以抛出哪些异常?或者更具体地说,DataContext.SubmitChanges() 方法抛出哪些异常?
I've been doing some searching on the internet, but I can't seem to find the awnser. What exceptions can a DataContext throw? Or to be more specific, what exceptions does the DataContext.SubmitChanges() method throw?
编辑
作为参考,这里列出了 L2S DataContext 可能抛出的可能的已知异常:
EDIT
For reference, here a List of possible known exceptions that could be thrown by the L2S DataContext:
你说得对,MSDN 在这方面帮不上大忙.这是我能从头顶上记住的:
You're right, MSDN is not a great help here. This is what I can remember from the top of my head:
这篇关于DataContext 的异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
LINQ to SQL:如何在不检索整个实体的情况下更新唯LINQ to SQL: how to update the only field without retrieving whole entity(LINQ to SQL:如何在不检索整个实体的情况下更新唯一字段)
string1 >= string2 未在 Linq to SQL 中实现,有什string1 gt;= string2 not implemented in Linq to SQL, any workaround?(string1 gt;= string2 未在 Linq to SQL 中实现,有什么解决方法吗?)
如何在条件下使用 RemoveAll 删除列表中的多个项目How to Remove multiple items in List using RemoveAll on condition?(如何在条件下使用 RemoveAll 删除列表中的多个项目?)
转换表达式树Convert Expression trees(转换表达式树)
当 IDENTITY_INSERT 设置为 OFF 时,无法为表“ClientCannot insert explicit value for identity column in table #39;ClientDetails#39; when IDENTITY_INSERT is set to OFF(当 IDENTITY_INSERT 设置为 OFF 时,
Linq 独特的 &最大限度Linq distinct amp; max(Linq 独特的 amp;最大限度)