Developers modify the foreign key side of a relationship if they want to change which columns are related to columns in the primary key table. To modify a foreign key they should follow the next steps:

C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development: Build applications with C#, .NET Core, Entity Framework Core, ASP.NET Core, and ML.NET using Visual Studio Code, 4th Edition
ASP.NET Core 3 and Angular 9: Full stack web development with .NET Core 3.1 and Angular 9, 3rd Edition
C# in Depth, 4th Edition

1. In Object Explorer, right-click the table with the foreign key, and click Design (Modify in SP1 or earlier). The table opens in Table Designer.

2. From the Table Designer menu, click Relationships.

3. In the Foreign Key Relationships dialog box, select the relationship in the Selected Relationship list.

4. In the grid, click the Tables and Columns Specifications and click the ellipses (…) to the right of the property.

5. In the Tables and Columns dialog box, select a different table column from the list. The foreign key column must match the data type and size of the primary key column, with these exceptions:

– A char column or sysname column can relate to a varchar column.

– A binary column can relate to a varbinary column.

– An alias data type can relate to its base type.

 

The constraint is updated in the database when developers save their table.