Hi I am trying to raise the PropertyChanged event of an EntityObject, I don't find a way to do it, is this possible?
views:
245answers:
2
                
                A: 
                
                
              You should be able to decorate the property with an attribute and then call the ReportPropertyChanging and ReportPropertyChanged method like so:
[EdmScalarPropertyAttribute(IsNullable = false)]
public byte Status
{
    get 
    {
        return _status;
    }
    set
    {
        if (_status != value)
        {
            ReportPropertyChanging("Status");
            _status = value;
            ReportPropertyChanged("Status");
        }
    }
}
                  jellomonkey
                   2009-08-23 02:07:31
                
              Wrong. 1) I wanted to workaround this ReportPropertyChanged, I wanted to raise the base class' event, the ReportPropertyChanged maybe eventually raises that event but it does more previous functionality too, when I said "manually raise" this is what I didn't want, I've just found the answer - very simple, take a look below.2) The code shown above is generated by a tool and I am not gonna mess around with it.3) I tagged my post with vb.net. Thank you for your response anyway.
                  Shimmy
                   2009-08-23 02:15:55
                1)Perhaps if you wanted to work around the ReportPropertyChanged functionality you could have mentioned it in the question. 2)The code didn't come from a tool. 3)This code is trivially easy to express in VB.net. 4) People like you are the reason I am going to stop participating in this community.
                  jellomonkey
                   2009-08-23 06:26:07