title: An attempt was made to remove a relationship between a (*) and a (*). However, one of the relationship's foreign keys (X) cannot be set to null
body: <p>I have an SQL Server table structure where in some columns are foreign keys that refer to different look up tables. These columns are created as <code>NOT NULL</code> and with <code>DEFAULT value = 1</code> as the look up value for <code>ID = 1</code> is the default value I want to assign in case <code>NULL</code> is passed while saving a record. </p>
  
  <p>However, I got below error while trying to <code>Add/Update/Delete</code> records of this child table.</p>
  
  <pre><code>An attempt was made to remove a relationship between a (*) and a (*). However, one of the relationship's foreign keys (X) cannot be set to null. 
  </code></pre>
  
  <p>I tried to search a lot but I got solution to change LINQ to SQL code or XML manually for resolving this. I cannot do that because in future when ever the table gets changed, I'll have to make sure the manual change is applied every time. </p>
  
  <p>Also, I can not change my columns to accept <code>NULL</code> because that will impact other applications using the same table through LINQ To SQL.</p>
  
  <p>I need more manageable solution for this. </p>