Update ViewModel sample code.