ActiveRecordPattern.ActiveRecordBase.tableName C# (CSharp) Method

tableName() protected static method

Возращает название таблици
protected static tableName ( Type Type ) : string
Type System.Type
return string
        protected static string tableName(Type Type)
        {
            
            StringBuilder tableName = new StringBuilder();

            var attributeValue = Attribute.GetCustomAttribute(Type, typeof(ActiveRecord)) as ActiveRecord;
            if (attributeValue.Name == null)
                tableName.Append(Type.Name);
            else
                tableName.Append(attributeValue.Name);

            return tableName.ToString();
        }