mardi 24 février 2015

Proper use of model in asp mvc


What is a proper use of model in asp mvc?


Should a model contain only data that will be accessed inside a form, or it is also a good idea to put data that are static and would be used in a view, but not inisde a form of a view.


I am asking this because I am curious about relevance of a model size on performance. If this static data should not be kept in a model, what would be a proper place for it - maybe ViewData, ViewBag or TempData. I still find it easy to store it in a model, and specify what data not to update on model update.


I would appreciate your comments..





Aucun commentaire:

Enregistrer un commentaire