Hello
Is there a way to disable foreign key checks for delete statements when using LINQ?
I tried it this way:
int result = MediaflowMySqlDb.ExecuteCommand("SET FOREIGN_KEY_CHECKS=0;");
User user= new User () { User Id= 1 };
TestDb.Templates.Attach(user);
TestDb.Templates.DeleteOnSubmit(user);
TestDb.SubmitChanges();
But the ExecuteCommand gives an exception about the argument types not matching. Is this a beta bug or how is ExecuteCommand intended to be used? Where can I find the documentation about this method?
________
Digital scales
How to disable foreign key checks when using MyDirect .NET?
-
- Posts: 43
- Joined: Wed 17 Sep 2008 11:31
How to disable foreign key checks when using MyDirect .NET?
Last edited by [email protected] on Thu 17 Feb 2011 05:19, edited 1 time in total.
-
- Posts: 43
- Joined: Wed 17 Sep 2008 11:31
Last edited by [email protected] on Thu 17 Feb 2011 05:20, edited 1 time in total.