The entity structure gives me general messages in the exception without telling me the exact entity and attribute that caused the error. How to get additional error information?
The operation failed: the relation cannot be changed because one or more properties of the foreign key are not NULL. When a change in relationship occurs, the corresponding property of the foreign key is set to zero. If the foreign key does not support null values, a new relationship must be defined, another nonzero value must be assigned to the foreign key property, or an object not associated with it must be deleted.
[SqlException (0x80131904): Converting a datetime2 data type to a datetime data type results in a value out of range. The application has been terminated.] System.Data.SqlClient.SqlConnection.OnError (SqlException exception, logical connection disconnection) +404 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning () +412 System.Data.SqlClient.TdsParser.Run (RunBehavior , SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2660 System.Data.SqlClient.SqlDataReader.ConsumeMetaData.Data.Sqlget.Data.SqlgetDlate.LetDlientItetDlateItget.DlateIlgetItelDaIlReItLaItReIlDlient (SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6431425 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds (CommandBehavior cmdBehavior, RunBehavior runBehavior CommandBehbeclnhdjehmenjecln1e1cd1n1emecd1n1e1cd1n1emecd1n1e1e1e1e1n4aaaaaaaaaaaaaaaaaaaejeanjejejehdjejehdjaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa runBehavior, B oolean returnStream, String method, result of DbAsyncResult) +538 System.Data.SqlClient.SqlCommand.RunExecuteReader (CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +28 System.Data.SqlClient.SqlCommizard.method ) +256 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader (CommandBehavior behavior) +19 System.Data.Mapping.Update.Internal.DynamicUpdateCommand.Execute (UpdateTranslator translator, EntityConnection connection, dictionary 2 identifierValues, List 1 generatedValues.) Data.Mapping.Update.Internal.UpdateTranslator.Update (IEntityStateManager stateManager, IEntityAdapter adapter) +391
[UpdateException: error updating records. See the Internal Exception for more details.] System.Data.Mapping.Update.Internal.UpdateTranslator.Update (IEntityStateManager stateManager, adapter IEntityAdapter) +11223976 Parameters System.Data.Objects.ObjectContext.SaveChanges (SaveOptions) +833 System.Data.Entity. Internal.InternalContext.SaveChanges () +218
[DbUpdateException: An error occurred while updating records. See Internal Exception for more details.] System.Data.Entity.Internal.InternalContext.SaveChanges () +291