Modifying a column with the 'Identity' pattern is not supported in WCF RIA Services
- by Banford
I've been following the walkthrough for creating your first WCF RIA Services Application from Microsoft and have encountered a problem when trying to edit and update data using the SubmitChanges() method of the Data Context.
The table being updated has an Identity Specification set in SQL Server 2008 on the 'CourseID' column. However the PRIMARY key is a composite of two other fields.
When using SubmitChanges() the application locks up in the browser an presents an unhandled exception. By handling this exception I managed to get the message: Modifying a column with the 'Identity' pattern is not supported. This is referring to the 'CourseID' column.
Turning identity specification off solves the problem, but I need the auto-incrementing ID. In what way isn't this supported. Or where am I going wrong?