Entity Model Element Grouping

The LLBLGen Pro designer supports the grouping of entity model project elements into groups. The elements which are groupable are: Entity Definitions, Value Type Definitions, Typed View Definitions, Typed List Definitions and Stored Procedure Calls. By default there's one group, the unnamed group, visualized in the Project Explorer by the folder icon without a name next to it. All groups are placed directly below the Entity Model node in the project explorer.

To place elements in a group, in Project Explorer right-click the entity model elements to place in a group and select Move to Group... from the context menu. This will bring up a small dialog allowing you to specify the name of an existing or new group. You can also change the name of the group an element is in, in the specific editor for the element. When no elements are present in a given group, it's automatically removed.

Different Group usages

Grouping of elements by default is used as a visual grouping mechanism. The designer can also interpret groups as separate output projects. This is controllable through the setting GroupUsage in the Project Settings. When Group usage is set to AsSeparateProjects, LLBLGen Pro will generate code for each group separately, instead of once for the whole project, which is the case when GroupUsage is set to AsVisualGroupingMechanism.

The validation system inside LLBLGen Pro's designer will take this setting into account as well: if GroupUsage is set to AsSeparateProjects it doesn't allow any connection between elements in two or more groups. This for example means that if entity A is in group G1 and entity B is in group G2, there can't be a relationship between A and B, as each group will result in a separate code base during code generation: the code base for G1 doesn't include a definition for B, as B isn't in G1, so this will result in an error.