I am working on Single Page application using Durandal framework. I want to call save method explicitly from Breeze controller. So to call save method explicitly, I was trying to set entity state modified in below way, but still I am unable to call save method in Breeze controller.
SelectedModelData().Model.entityAspect.entityState.name = "Changed";
SelectedModelData().Model.entityAspect.entityState.isModified = true;
SelectedModelData() is observable. And Model is entity inside that observable.
The EntityState values are like Enums, so you can't just change the name. The correct way is:
or
See http://breeze.github.io/doc-js/inside-entity.html#EntityState for more info.