next gen RTIDDSGEN - also Entity Framework 6

2 posts / 0 new
Last post
Offline
Last seen: 2 years 6 months ago
Joined: 10/18/2013
Posts: 42
next gen RTIDDSGEN - also Entity Framework 6

I've heard rumors from my coworkers that there is a new rtiddsgent that would allow for customization templates to get more control of the generated code.  can you talk to that?


I am trying to use Entity Framework 6 code first programming to create an EF datamodel based on the rtiddsgen generated .NET (.IDL) code.  I'm looking for ways to add Data Annotations to the generated code.  My first thought is to derive from the generated classes and use the Fluent API to add Entity Framework validations to the child classes, that are otherwise just shells to incase the generated classes.  any better ideas?

rip
rip's picture
Offline
Last seen: 3 days 51 min ago
Joined: 04/06/2012
Posts: 324

Hi Jay,

rtiddsgen2 is supplied as an experimental in 5.1.0.  (see [install]/ndds.5.1.0/scripts/rtiddsgen2

It is based on the Apache Velocity template engine.  The templates are much better suited to customization.  Look in [install]/ndds.5.1.0/resource/rtiddsgen/templates .

The problem you'll have in the exp version is that the list of .vm files to process (by filename) is currently hardwired into rtiddsgen2.  You'll have to work around that, or do all the work in the existing files.  There is an enhancement requested to fix change that.

I don't know C#, so I'll have to defer the other half of your question to others.