Change the state of an entity using ChangeState method of ObjectStateEntry class

We have seen how to change the state of an entity using ChangeObjectState method of ObjectStateManager. One more method to change the state of an entity from one to another is ChangeState() method of ObjectStateEntry class. The below code demonstrates how to use ChangeState method of ObjectStateEntry class. Using this method is very simple because we can use this method with ObjectStateEntry class.
code for ChangeState method of ObjectStateEntry class