using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data.SqlClient; using Xtensive.Orm; using Xtensive.Orm.Validation; using EMS.BLL.Model; using EMS.BLL.Administration.Menu; using EMS.BLL.Administration.Interfaces; namespace EMS.BLL.MasterInfo.Common { [Serializable] [TableMapping(TableMapping.Breed)] [MenuPath("MasterInfo.Common")] [Index("NameEn", Unique = true)] [Index("NameAr", Unique = true)] public class Breed : BusinessEntity, IsLinkable { [Field(Length = LengthMapping.CodeLength)] [NotNullOrEmptyConstraint] [LengthConstraint(Min = 5)] public string Code { get; set; }
} |
Hello Bhavini Our constraints are based on PostSharp aspects. Those aspects are inherited from System.Attribute. Make sure that you add reference to PostSharp library. |
in above code this type of problem is create Error : 'Xtensive.Orm.Validation.NotNullOrEmptyConstraint' is not an attribute class