using System; namespace Easy4net.CustomAttributes { /// /// 数据库表特性 /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] public class TableAttribute : Attribute { /// /// 数据库名 /// private string _Name = string.Empty; /// /// 创建一个空的数据库表特性,默认具备自增长键 /// public TableAttribute() { NoAutomaticKey = false; } /// /// 创建一个制定表明的数据库表特性,默认具备自增长键 /// /// 数据库表名 public TableAttribute(string aName) : this() { this.Name = aName; } /// /// 数据库名 /// public string Name { get { return _Name; } set { _Name = value; } } /// /// 不具备自增长键的表 /// public bool NoAutomaticKey { get; set; } } }