Beispiel #1
0
        /// <summary>
        /// Gets the name of the column based on property name.
        /// </summary>
        /// <param name="propertyName">Name of the property.</param>
        /// <returns>The column name.</returns>
        public string GetColumnName(string propertyName)
        {
            var IDProperty = IDProperties.Find(x => x.Name == propertyName);

            if (!(IDProperty is null))
            {
                return("[" + SchemaName + "].[" + TableName + "].[" + IDProperty.ColumnName + "]");
            }

            var ReferenceProperty = ReferenceProperties.Find(x => x.Name == propertyName);

            if (!(ReferenceProperty is null))
            {
                return("[" + SchemaName + "].[" + TableName + "].[" + ReferenceProperty.ColumnName + "]");
            }

            return(string.Empty);
        }