Ejemplo n.º 1
0
 private void SetClassNamesOnColumns(SchemaManager schemaManager)
 {
     schemaManager.CurrentSchema.Tables.Each(table =>
     {
         table.Columns.Each(col =>
         {
             col.TableClassName = NameMap.GetClassName(table.Name);
         });
     });
 }
Ejemplo n.º 2
0
        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);
        }