Deletes an entity from the main entity set based on a key value.