Change notification in EF EntityCollection

Posted by Savvas Sopiadis on Stack Overflow See other posts from Stack Overflow or by Savvas Sopiadis
Published on 2010-05-07T16:22:40Z Indexed on 2010/05/07 16:28 UTC
Read the original article Hit count: 336

Hi everybody!

In a Silverlight 4 proj i'm using WCF RIA services, MVVM principles and EF 4. I 'm running into this situation: created an entity called Category and another one called CategoryLocale (automated using VS, no POCO). The relation between them is 1 to N respectively (one Category can have many CategoryLocales), so trough this relationship one can implement master-detail scenarios.

Everytime i change a property in the master record (Category) i get a notifypropertychanged notification raised. But: whenever i change a property in the detail (CategoryLocales) i don't get anything raised.

The detail part is bound to a Datagrid like this:

<sdk:DataGrid  Grid.Row="3" Grid.ColumnSpan="2" 
                       ItemsSource="{Binding SelectedRecord.CategoryLocales,Mode=TwoWay}"
                       AutoGenerateColumns="False"
                       VerticalScrollBarVisibility="Auto"                       
                       >

Any help is appreciated!

Thanks in advance

© Stack Overflow or respective owner

Related posts about silverlight-4.0

Related posts about entity-framework