principalTable: &quot;AppPersons&quot;,
            principalColumn: &quot;Id&quot;,
            onDelete: <strong>ReferentialAction.SetNull</strong>);
    }

    //...
}</pre>

<p>I just changed ReferentialAction.Restrict to ReferentialAction.SetNull. It does that: if I delete a person, assigned tasks to that person become unassigned. This is not important in this demo. But I wanted to show that you can change the migration code if you need. Actually, you always review the generated code before applying it