WPF MVVM using LINQ to SQL -


i have binded customer name textbox customer model , set mode 2 way want update edited name database. how can achieve ?

your question vague doesn't whether wanted on propertychanged or when have button either click event handling or icommand binding on it.

the decision when update totally down business model applying. speaking, it's never idea update directly propertychanged event because might temporary edit , may wish update against.

for example, if have updatesourcetrigger=propertychanged, character type, property updated new value , if implmented inotifypropertychanged events, instantly fire update database. because database connection transient, on network, may or may not available, , may or may not timeout during partial update. thus, end locking code or if multi-threading, causing race conditions.

therefore, it's better implement changes via save button or when screen closed/navigated away (such ios/android do).


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -