c# properties making string required code example
Example: c# properties making string required
using System.ComponentModel.DataAnnotations;
{
[Required(ErrorMessage = "DocumentType is required.")]
public string DocumentType
{
get { return _documentType; }
set { _documentType = value; }
}
}