This project is read-only.

Extensions in nHydrate

Nov 6, 2013 at 6:24 PM
Edited Nov 7, 2013 at 8:18 AM
I'm looking into nHydrate to see if it can replace our current modelling tool.
At this time I've read some of the documentation and have few questions, I hope someone can answer them :
  1. Can we create/develop custom nHydrate 'Generators' for database / UI ?
  2. Can we extend the model / table / field information by adding custom properties to them to store additional information within the model / table / field ? Let's say I'd like to add a property 'IsUppercase' to Field or a DeleteAction property to an Association, would that be possible ?
  3. Our current model generates code based on T4 templates, would it be possible to re-use those templates or is code-generation in nHydrate done completely different ?
Nov 7, 2013 at 12:43 PM
You can create your own templates a they are just string generators off a common modal. However extending the modal is not really in the design. It is a DSL using the Microsoft DSL tools. The modal is static and created at design time. You can take the source and add functionality, but you would then be off the main line of course. You can use the modal with T4 templates, but since the modal is of a particular design you will most likely have to do a lot of "tweaking" to your T4 templates, which might defeat the purpose of "reuse".

If you can use the system as designed it does work well. However extending it does involve some compromise and work,