0

I'm rewriting an ASP.NET MVC3 app in MVC5 which makes heavy use of Knockout and MVVM. The model classes are heavily laden with INotifyPropertyChanged and INotifyPropertyChanging functions.

While bringing the following statements into the MVC5 app, I'm receiving the build error in the subject line above:

public event PropertyChangingEventHandler PropertyChanging;
    public event PropertyChangedEventHandler PropertyChanged;

    protected virtual void SendPropertyChanging()
    {
        if (this.PropertyChanging == null)
            return;
        this.PropertyChanging((object)this, AFCity.emptyChangingEventArgs);
    }

What must be done to resolve the above error?

SidC
  • 3,175
  • 14
  • 70
  • 132
  • So much wrong here. First, knockout doesn't know crap about events, so you can simply strip all the INPC shit right out. And we have no idea what this `AFCity.emptyChangingEventArgs` nonsense is. And I call it nonsense because INPC is worthless if you don't pass in the name of the property that's changing. This question suggests you don't know how MVC works; I'd strongly suggest you create a small prototype that has one view, one WebAPI controller, and uses knockoutjs to do something simple. You're mixing desktop and web paradigms, which will get us all killed. –  Dec 08 '14 at 17:53
  • *knockout doesn't know crap about **INPC and other server-side non-DOM related** events* –  Dec 08 '14 at 18:24

0 Answers0