In my model class I have a boolean property DoNotEmail.
In the UI design I've been given to create a view for, the meaning of the checkbox is inverted; i.e. the label next to the checkbox says "Send Email".
Normally I would add the checkbox like this: @Html.CheckBoxFor(model => model.DoNotEmail) but clearly this is the wrong way round.
Do I need to create a separate view model with a custom property for this checkbox, or is there some clever way I can do something like: @Html.CheckBoxFor(model => !model.DoNotEmail) (which clearly doesn't work)?
DoNotEmaila field from the database? Is your model class an entity or a custom model?