private void SetTableDescriptions(Type tableType)
    {
        string fullTableName = context.GetTableName(tableType);
        Regex  regex         = new Regex(@"(\[\w+\]\.)?\[(?<table>.*)\]");
        Match  match         = regex.Match(fullTableName);
        string tableName;

        if (match.Success)
        {
            tableName = match.Groups["table"].Value;
        }
        else
        {
            tableName = fullTableName;
        }
        var tableAttrs = tableType.GetCustomAttributes(typeof(TableAttribute), false);

        if (tableAttrs.Length > 0)
        {
            tableName = ((TableAttribute)tableAttrs[0]).Name;
        }

        // set the description for the table
        string tableComment = reader.GetCommentsForResource(tableType, null, XmlResourceType.Type);

        if (!string.IsNullOrEmpty(tableComment))
        {
            SetDescriptionForObject(tableName, null, tableComment);
        }

        // get all of the documentation for each property/column
        ObjectDocumentation[] columnComments = reader.GetCommentsForResource(tableType);
        foreach (var column in columnComments)
        {
            SetDescriptionForObject(tableName, column.PropertyName, column.Documentation);
        }
    }