I would only use one on a ViewModel. It doesn't belong in a Model.

On Mon, Jan 17, 2011 at 10:32 AM, Karl Oakes <[email protected]> wrote:

> When using data annotations on models/viewmodels I am comfortable with
> using the validation attributes, such as Required, Range etc, I am not so
> comfortable with using display attributes, i.e.DisplayName, which can be
> used to display a friendly name for the model property when using strongly
> typed views and html helper methods, i.e. Html.EditorForModel. Is this
> convenience method blurring the 'separation of concerns' paradigm? Maybe
> they should be only used on ViewModels and not strictly Models.  What are
> other people's thoughts on using data annotations on models/viewmodels.
>

Reply via email to