The documentation comes from the Markdown files in the source code, so is always up-to-date but available only in English. Enjoy!
The LogicCodeGenerator scans all System.Type instances in the main entities assembly that inherit from Entity and are non-abstract. After grouping them by module name, it generates logic files that include:
sb.Include<T>() instructions to include each entity type in the database schema..WithSave(...), and .WithDelete(...) to register operations..WithQuery(...) for registering queries and WithExpressionFrom(...) for registering expression queries.The following tree shows the call hierarchy of the main methods. All methods are protected and virtual, so you can override them as needed.
GenerateLogicFromEntities
GetModules (using CandidateTypes and CodeGenerator.GetModules)
WriteFile
GetExpressions(type)
ShouldWriteExpressionGetUsingNamespacesGetNamespaceWriteLogicClass
WriteExpressionMethodWriteStartMethod
WriteInclude
ShouldWriteSimpleOperations (for Save)ShouldWriteSimpleOperations (for Delete)ShouldWriteSimpleQueryWriteQuery (fallback for advanced scenarios)WriteOperations (fallback for advanced scenarios)
GetOperationsSymbols(type)
WriteOperation
WriteExecuteOperation
WriteDeleteOperation
WriteConstructFrom
WriteConstructFromMany
WriteConstructSimple
© Signum Software. All Rights Reserved.
Powered by Signum Framework