To update the entity in question you need to get a new entity for it from the context rather than setting it directly.
OrderRecord.customerId = 105;
Throws an error!
“Operation is not valid due to the current state of the object”
OrderRecord.tblCustomer = db.tblCustomers.Single(t => t.customerID == 105);
Returns no error!