Ok, I'm stumped - i'm trying insert a record using EF. now the primary key "Id" is an identity int, and when i instantiate a new instance of the entity i do NOT provide a value for the Id field, however it is still complaining that i should NOT explicitily provide a value???
but i'm not??
this is the code to instantiate a new instance of the entity which i'm trying to add via EF:
{An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: System.Data.UpdateException: An error occurred while updating the entries. See the InnerException for details. ----> System.Data.SqlClient.SqlException: Cannot insert explicit value for identity column in table 'Skill_Comment_D' when IDENTITY_INSERT is set to OFF. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at System.Data.Mapping.Update.Internal.DynamicUpdateCommand.Execute(UpdateTranslator translator, EntityConnection connection, Dictionary`2 identifierValues, List`1 generatedValues) at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter) --- End of inner ExceptionDetail stack trace --- at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter) at System.Data.EntityClient.EntityAdapter.Update(IEntityStateManager entityCache) at System.Data.Objects.ObjectContext.SaveChanges(Boolean acceptChangesDuringSave) at System.Data.Objects.ObjectContext.SaveChanges() at EntityFrameworkTools.ModelAccess`1.AddEntity[EntityType](EntityType entity) at SkillMatrixService.SkillMatrixService.AddSkillComment(SkillComment skillComment) in C:\Development\Tokyo\GroupIT\DEV\SkillMatrixService\SkillMatrixService\SkillMatrixService.cs:line 550}I.W Coetzer