If Controller
first validates ViewModel
properties and then uses ViewModel
properties, there may be small chance that ViewModel
state may change to invalid between validation and usage, resulting in exceptional control flow.
Is there any common practice or pattern to ensure ViewModel
state doesn't change and / or properties can be safely used after validation?
Aucun commentaire:
Enregistrer un commentaire