Hi,
I am able to save the data to database using the save command. But the entered data is not cleared after successfully save operation.
How do I clear the values in ViewModel itself.
Thanks
Hi,
I am able to save the data to database using the save command. But the entered data is not cleared after successfully save operation.
How do I clear the values in ViewModel itself.
Thanks
Easy - you instantiate ("new up") a new ViewModel and bind it to the View. What makes you think you need to recycle the old one?
Arguably a ViewModel should not know about clearing itself - that is the job of the Model, and the easiest most pain free way to do it is to new up another one, throw the old one away.