Showing posts with label Domain Model. Show all posts
Showing posts with label Domain Model. Show all posts

Entities generation revamped in Xomega 7.8

Starting from release 7.8, Xomega has completely upgraded the way Entity Framework classes are generated.

Entity Framework classes are generated now directly from the Xomega model.

Previously, the Entity Framework (EF) classes were generated using standard Model-First EF T4 templates from an Entity Data Model (EDM), which was in turn generated from the Xomega model. Now they are generated directly from the Xomega model using a new Xomega generator called EF Domain Objects. Generating EDM is no longer needed for the application, but that generator is still available in case you want to view your entity model on graphical diagrams.

This provides a lot of benefits as a result, such as the following.


  • Full control over the way Entity Framework classes are generated.
  • Ability to output generated classes using Xomega standards - grouped in sub-folders by module, individual files in a single folder, or even all generated classes in a single file.
  • Generated classes and their fields now have documentation comments from their Xomega model’s doc elements to help developers use them correctly.
  • No need to run T4 templates after the Xomega generation, which was failing sporadically, resulting in compile and run-time errors after domain model updates.
  • No need to maintain edm:type configurations on logical types, unless you need to generate an EDM for diagrams, since Xomega uses now the clr:type configurations instead.
  • Ability to use Entity Framework Core in the future, which does not support EDM.

Entity configurations are generated by each entity using Fluent API.

Without the generated EDM, the EF classes use Fluent API now to configure the domain entities. Unlike the standard EF generators that create entities from database tables and output all configurations into a single method OnModelCreating of the generated DbContext class, configurations for entities generated from the Xomega domain objects are segregated neatly into separate files for each entity, which makes them much more easier to work with, and keeps the code for the entities and the context very clean.

Fluent API allows you to easily customize or override configurations of each entity without touching the generated code. For example, you can tweak configurations of any property,   entity or relationship in a subclass of the generated DB context, and then register that subclass with the Dependency Injection container.

Documentation Generation now in Xomega


We're happy to announce a series of new releases of Xomega.Net for Visual Studio 2008-2012, which now support generation of high quality professional technical documentation from your Xomega model in Microsoft Word format.

You will no longer have to spend countless hours creating and maintaining technical design documents to share with other project stakeholders or to deliver to your clients. Instead, you can maintain descriptions of different elements right in the model and then instantly generate all the needed documentation from the model. You can also rest assured that your documentation will always be in sync with the actual implementation.

The out-of-the-box documentation generators include Domain Model Design, Service Model Design and Static Data Design document generators. The generated documents describe both the general domain, service and static data architectures as well as details for all domain objects, services and enumerations.

And the best part is that
you can easily customize the generators and the underlying MS Word templates to override any document properties, change the style of the document and update its structure to include the exact information in the document the way you need it.

Also, the new releases add support for multiple database versions and specifically SQL Server 2008 and 2012.

Please download the latest release for your version of Visual Studio and contact us if you have any questions about it, or if you need any help with it. We would be glad to assist you with any issues you might have.