using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.ComponentModel.DataAnnotations; namespace Sleis.Models { public abstract class ContactModel : BaseIdentityModel { public virtual ContactMethodType Type { get; set; } [Required(ErrorMessage = Constants.RequiredErrorMessage)] public virtual string Value { get; set; } public virtual int Index { get; set; } public override void SetContext(string parentContext) { ValidationContxt = String.Format("{0} Contact Point Type:{1}", parentContext, Type); } } }