开发者

C#: Linq update without checking constraints and foreign key

What property needs to be set so that when i call DataContext.Submit changes or UpdateAll, the contraints that are there needs to be overlooked. Constra开发者_如何学JAVAints such as foreign key and also primary key contraints


You cannot just "switch off" all those checks from outside the database. You can disable it on the database when needed, e.g. when you want to bulk insert a large number of rows.

But a database access component like Linq-To-SQL cannot (and should not!) just turn those checks off. Those checks are there for a good reason!

What reason do you have to want to turn off those checks?? What are you trying to accomplish? If you explain a bit more, maybe the community can help you find ways to accomplish what you want to do without those dirty tricks....

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜