This project is read-only.

Using nHydrate with CSLA - edmx file?

Oct 15, 2010 at 10:54 AM

I want to use nHydrate's EFDAL with CSLA providing the business layer of my WPF app.

In particular, I'd like to use T4 templates to generate the CSLA classes.
Now this project loads a EF Artifact Generator as an additional T4 template via the "Add Code Generation Item ..." right-click menu in the edmx file's design surface.
So, it would be helpful if nHydrate were to generate an Edmx  file.
I know this sounds odd, as nHydrate is a text based MDA tools and not a graphical one.

Otherwise, I can work round by adding a dummy class library and obtaining the Edmx file from importing the Database.
So my development cycle would be very inconvenient...
Change my Model, generate and the database with nHydrate, then import changes into the Edmx file, then run t4csla.

If nHydrate were to generate the Edmx, the development cycle would be streamlined.


(The chances of a CSLA generator for nHydrate are zero, as there are already quite a few CSLA generators and another would be overkill)


Oct 15, 2010 at 10:57 PM

Well, I've done it. I've added a edmx Generator Item to the EFDAL generator.
Haven't tested it fully yet, but the edmx opens in Visual Studio with the Entities showing.
I built it by re-running the three csdl, ssdl and msl generators into to an edmx generator blank.
So it's the opposite of how EF works.
It means I've been able to add the T4Csla generator, but of course the csla files are generated into the wrong class library, which I've got to fix.
I'm going to add the source files on my blog,