Best practise: using _Changed methods 2

Problem

Whenever a property in a related entity is read in code, Light Switch fires a change event on the parent, but doesn’t actually change any properties on the parent.

 Solution

Just put this code at the start of all _Changed methods and you are save. The code after that will only run when the entity has really changed.

c#

vb.net

 

2 thoughts on “Best practise: using _Changed methods

  1. Pingback: LightSwitch Community & Content Rollup–February 2013 - Beth Massi - Sharing the goodness - Site Home - MSDN Blogs

  2. Pingback: LightSwitch Community & Content Rollup–February 2013 | MSDN Blogs

Leave a Reply