In my case, I had a composite key and was trying to update part of it (3 columns constitutes a composite key, out of which i was updating 3rd column only) but EF didn't allow changing key values for the same object, I achieved updating the record through:
Context.Database.ExecuteSqlCommand(udpateCommand);