diff Source/DataAccess/TableNameAttribute.cs @ 0:f990fcb411a9

Копия текущей версии из github
author cin
date Thu, 27 Mar 2014 21:46:09 +0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Source/DataAccess/TableNameAttribute.cs	Thu Mar 27 21:46:09 2014 +0400
@@ -0,0 +1,34 @@
+using System;
+
+namespace BLToolkit.DataAccess
+{
+	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface)]
+	public class TableNameAttribute : Attribute
+	{
+		public TableNameAttribute()
+		{
+		}
+
+		public TableNameAttribute(string name)
+		{
+			_name = name;
+		}
+
+		public TableNameAttribute(string database, string name)
+		{
+			_database = database;
+			_name     = name;
+		}
+
+		public TableNameAttribute(string database, string owner, string name)
+		{
+			_database = database;
+			_owner    = owner;
+			_name     = name;
+		}
+
+		private string _database; public virtual string Database { get { return _database; } set { _database = value; } }
+		private string _owner;    public virtual string Owner    { get { return _owner;    } set { _owner = value;    } }
+		private string _name;     public virtual string Name     { get { return _name;     } set { _name = value;     } }
+	}
+}