private void SetClassNamesOnColumns(SchemaManager schemaManager) { schemaManager.CurrentSchema.Tables.Each(table => { table.Columns.Each(col => { col.TableClassName = NameMap.GetClassName(table.Name); }); }); }
private string AvoidNameOfContainingType(string propertyName, string tableName, string columnName) { string className = NameMap.GetClassName(tableName); string result = propertyName; if (propertyName.Equals(className)) { result = _namingCollisionHandlers[SchemaExtractorNamingCollisionStrategy](propertyName, tableName, columnName); FireEvent(PropertyNameCollisionAvoided, new SchemaExtractorEventArgs { Table = tableName, Column = columnName, Property = propertyName }); } return(result); }