system.Componetmodel.dataanotation
System.ComponentModel.DataAnnotations Namespace
System.ComponentModel.DataAnnotations Example : using System.ComponentModel.DataAnnotations; namespace SuperheroSample.Models { public class Superhero { [Required] public string Name { get; set; } public bool WearsCape { get; set; } } }
System.ComponentModel.DataAnnotations
If you want to perform model validation using DataAnnotations Attributes, you must include System.ComponentModel.DataAnnotations name space. there are many DataAnnotation attributes are in MVC for validation Please refer below link for more details. http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations(v=vs.100).aspx