The documentation comes from the Markdown files in the source code, so is always up-to-date but available only in English. Enjoy!
Reads the database schema using SchemaSynchronizer.DefaultGetDatabaseDescription
and generates all the entity classes, including operations.
Typically, one entity per table is generated with field attributes (SqlDbTypeAttribute
, ColumnAttribute
, TableAttribute
, PrimaryKeyAttribute
...) so that once the entities are included in the Schema and Signum takes control of the database schema, executing the Synchronized should produce minimal changes.
More than one entity can be written in the same class if GetFileName
returns the same value.
EntityCodeGenerator
is also able to create MList<T>
fields and EmbeddedEntity
classes for some tables, he uses some heuristics but you can override GetMListInfo
to teach it which tables should be considered MList<T>
.
Finally, you can manipulate the source database information by overwriting GetTables
to remove redundant columns, add foreign keys, etc.. to help EntityCodeGenerator
create better classes.
This tree shows the call hierarchy or the methods, all protected
and virtual
so you can override them.
GenerateEntitiesFromDatabaseTables
GetTables
SchemaSynchronizer.DefaultGetDatabaseDescription
GetSolutionInfo
GetFileName
:
WriteFile
GetUsingNamespaces
WriteTableEntity
GetMListInfo
is not null
null
WriteEmbeddedEntity
IsEnum
call WriteEnum
WriteEntity
GetEntityName
GetEntityAttributes
GetEntityKind
and GetEntityData
GetTableNameAttribute
GetPrimaryKeyAttribute
GetPrimaryKeyColumn
GetValueType
GetSqlDbTypeParts
GetTicksColumnAttribute
GetBaseClass
WriteBeforeFields
WriteField
GetRelatedEntity
GetFieldType
GetFieldName
GetFieldAttributes
HasNotNullableAttribute
GetSqlTypeAttribute
GetSqlDbTypeParts
DefaultColumnName
HasUniqueIndex
GetPropertyAttributes
HasNotNullValidator
IsReadonly
GetMListInfo
is null, skipWriteFieldMList
GetEntityName
GetRelatedEntity
GetFieldType
GetFieldAttributes
GetPrimaryKeyAttribute
GetTableNameAttribute
GetBackColumnNameAttribute
GetFieldMListName
WriteAfterFields
WriteToString
GetToStringColumn
WriteOperations
GetEntityKind
is not Main, Shared or String, skipGetOperationName
© Signum Software. All Rights Reserved.
Powered by Signum Framework