开发者

How to implement IEditableObject for View Model?

开发者 https://www.devze.com 2023-01-16 02:07 出处:网络
Suppose I have VM with some entities as property. Say People, Addres, Phone, .... Then I want to implelemt IEditableObjecton VM so that u开发者_如何转开发ser have undo functionnality.

Suppose I have VM with some entities as property. Say People, Addres, Phone, .... Then I want to implelemt IEditableObject on VM so that u开发者_如何转开发ser have undo functionnality.

What's the best way to implement request?

Demo code please.


Have a look at following two links which have good examples

http://www.a2zdotnet.com/View.aspx?Id=135

Using IEditableObject In Silverlight


IEditableObject doesn't make sense on a view model since all commands from the view such as Edit, Cancel, etc. are implemented in the view model itself. At best you can use IEditableObject internally in your view model on the data classes to make them easier to manage.

0

精彩评论

暂无评论...
验证码 换一张
取 消