none
How do you remove Foreign Key Constraint from database? RRS feed

  • Question

  • I need to temporarily remove the foreign key constraint in the database to update a table. Does anyone know how to do this using LINQ to SQL in C#? I am using WCF silverlight service with Entity Framework to connect to the MS SQL 2005 server if that helps
    JTK
    Monday, October 4, 2010 1:20 PM

Answers

  • Iam pretty sure that LINQ to SQL doesn't support your scenario. Perhaps you could trigger a SQL script or a stored procedure?

    Or just create an insert/update/delete that is consistent with foreing keys.


    Miha Markic [MVP C#] http://blog.rthand.com
    • Marked as answer by liurong luo Thursday, October 14, 2010 10:48 AM
    Monday, October 4, 2010 6:58 PM