Is it good or bad practice to apply System.ComponentModel.DefaultValue default values to my properties? What about my ViewModel properties?
I ask because I’m passing a ViewModel into my Controller. This ViewModel contains properties such as OrderByColumn, SortDirection and PageSize. When the page first loads, these need to be set to something.
If you are comfortable setting these values in your ViewModel then it should be ok. I do this for setting SelectLists that are tied to Enumerations on my view. As long as these are defaults for the particular View. If these are more wide sweeping I would suggest building some kind of convention to set them inside your controller.