Search code examples
asp.net-mvcknockout.jsknockout-mvckolite

Field-level change tracking with ASP.NET MVC4 & Knockout


Wondering if anyone out there has experience with tracking field-level change tracking? We are trying to discern the easiest/best way to track any and all model modifications by end-users. I am using ASP.NET MVC4, Knockout, and Knockout Editables.

UPDATE: Due to the requirements of the tracking feature, just detecting if the object is dirty isn't enough, as I need to determine what has changed and the value. I have opted to use a for loop to iterate over the model properties, detecting changes with KO Editables.hasChanges() function, and building a custom log object from that using current value and .oldValue() (KO Editable).


Solution

  • Due to the requirements of the tracking feature, just detecting if the object is dirty isn't enough. I have opted to use a for loop to iterate over the model properties, detecting changes with KO Editables .hasChanges() function, and building a custom log object from that using current value and .oldValue() (KO Editable).