I'm using a Database First codestrategy, and have POCOs and context generated by EF4.x DBContext Generator
.
In short when I was using ObjectContext, for triggering a notification I was extending a entity like this:
public partial class Customer
{
public Customer()
{
this.AddressReference.AssociationChanged += AddressReference_AssociationChanged;
}
private void AddressReference_AssociationChanged(object sender, CollectionChangeEventArgs e)
{
OnPropertyChanged("Address");
}
}
Is there something similar when working with DBContext and POCOs ?
EDIT:
I need this for an ChangeNotification when Customer.Address = new Address. By default scalar properties are raising ChangeNotifications but Navigation Properties are not.