store-model

The store-model tag helper allows the developer stores a full object with all sub-objects nested in its properties in the page and get it back in the ViewModel when the form is submitted. The object is stored either in Json format or in an encriped format (in case we want to prevent the client side from modifying the object). It is usefull for changes-tracking. It is enoough to store the original copy of an object in the page, and then comparing it with the object after all user modifications. This technique is used to get all changes in a list of objects when using the grid in batch mode.

See it live

Tag helper properties

Tag name
store-model
asp-for: expression
the property containing the object to store
encrypted: bool
if true the object is stored in encripted format

Fork me on GitHub