custom property dependency over database fields
-
Friday, December 28, 2012 4:29 AM
Hi,
How to get notified on custom fields, which depends on Database table fields.
For ex:
I created a custom property called FullName over Database fields FirstName and LastName. If I change the value of LastName, it gets notified on LastName property but FullName remains the same. How to get FullName refreshed with the value changed in both of the dependent Properties.
Regards,
All Replies
-
Monday, December 31, 2012 6:01 AM
Hi Antonv,
Based on my known, No easy way.
Ghost,
Call me ghost for short, Thanks
To get the better answer, it should be a better question. -
Wednesday, January 02, 2013 8:56 AMModerator
Hi Antony,
In Linq To SQL, each property has two partial methods which are extensibility methods. You can find them in corresponding class, and its name is On+propertyname+Changing and On+propertyname+Changed. You use write your own logic for these methods to change FullName when FirstName or LastName changes.
Good day.
Alexander Sun [MSFT]
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- Marked As Answer by Antony Joseph A.V Thursday, January 03, 2013 5:03 AM
-
Thursday, January 03, 2013 5:06 AM
Hi Crazy,
Thank you Ghost for your kind reply. I will try to explain better to make it a better question, from later onwards.
-
Thursday, January 03, 2013 5:08 AM
Hello Alexander,
Thanks for your reply,
It works fine, we were actually working on partial methods, but didn't noticed this option. Thanks again for your quick and detailed answer.

