UpdateException: Operation is not valid due to the current state of the object when using Entity Framework and Oracle
问题 I'm attempting to add a new Entity object for persistence, however I'm getting an UpdateException who's inner exception is an InvalidOperationException with the message: Operation is not valid due to the current state of the object. Object being created: var something = new SITE { EntityKey = new EntityKey("DataModelContainer.SITE", "SITE_ID", "ID"), SITE_COMMON_REFERENCE = "hello", SITE_ID = "hello" }; which is then passed to: public void ExportSiteData (SITE exportSiteData) { _context.SITE