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....
精彩评论