Search code examples
.netasp.netlinq-to-sqldynamic-data

Enabling editing of primary key field in ASP.NET Dynamic Data / LINQ to SQL


If you have a table with a compound primary key that is composed of a foreign key and other table columns, how do you get ASP.NET Dynamic Data to allow the non-foreign primary key table columns to be editable?


Solution

  • LINQ to SQL does not support changing the primary key of an entity even without using Dynamic Data.