Conversion from Entity Framework EDMX?

Posts   
 
    
KendallB
User
Posts: 3
Joined: 05-Jul-2011
# Posted on: 05-Jul-2011 01:48:42   

Hi,

I would like to evaluate the native LLBLGen pro feature set and compare it performance wise with our product to using Entity Framework. Is there a way to take an existing Entity Framework 4 EDMX file, and import it for use with LLBLGen Pro?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 05-Jul-2011 05:20:19   

Hi KendallB,

There is no a built-in solution to do that. However, as I see you have two options:

A. Create a new LLBLGen project and add you DB model as if you are working on a new project. Then generate the EDMX and code. You can adjust here and there your LLBLGen project so the result will be close to your old EDMX file.

B. Since v3.1 a new feature was added: Importers. They are like plugins you can use to import object information from other sources. At the moment LLBLGen is shipped with a LLBLGenProProjectImporter which takes an existing .llblgenproj file and allows you to import objects to your new project. If you want you could create your own EDMX importer. The source code for the LLBLGenProProjectImporter is downloadable from the LLBLGen's site -> Customer Area in the SourceCode package. You can take that as the base to build your own Importer.

David Elizondo | LLBLGen Support Team
KendallB
User
Posts: 3
Joined: 05-Jul-2011
# Posted on: 05-Jul-2011 19:56:22   

Ok thanks. Not being able to convert my model is a huge impediment to me being able to evaluate your software. The reason is that we are modelling a legacy MySQL database and when we did the model in Entity Framework, we made a lot of changes to the conceptual schema to clean things up and make things consistent naming wise from the C# level. So generating a new schema from the database is not useful at all, since then I would have to go through the entire process of mapping the database all over again (and we cannot change the schema yet as we still have a lot of legacy PHP code that uses the same database).

I won't have any time to write my own importer to bring in the EDMX file, so I will spend my time evaluating the tools where I can import the file over (OpenAccess ORM and Mindscape Lightspeed).

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 05-Jul-2011 22:33:58   

I seem to remember an EDMX importer being in the pipeline, possibly for 3.2. What sort of timescale are you working to...?

Matt

KendallB
User
Posts: 3
Joined: 05-Jul-2011
# Posted on: 05-Jul-2011 23:46:17   

I need to find a solution to our performance issues with the Entity Framework within the next few weeks.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 06-Jul-2011 07:11:31   

I understand. Please stay tuned to see if the Importer is released soon.

David Elizondo | LLBLGen Support Team
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39905
Joined: 17-Aug-2003
# Posted on: 06-Jul-2011 10:46:33   

Importing an EDMX is planned but it's not a thing to do in a couple of days, so we can't help you on that front this week. BUT, our designer has a wide range of naming tools and other tools to get a reverse engineered model properly setup on a legacy database. The competing tools might have an import system (although I doubt they can deal with a lot of the EF edge cases), our reverse engineering tools might actually get you very far with a project started from the DB.

Importing an EDMX is done through 2 ways: either an XML conversion (though this is very hard to do) or a meta-data retrieval from a live context which has loaded a valid EDMX. This latter approach is easier, but still complicated. One of the core issues is the code part: an EDMX contains mappings between entity type and code classes, which is unique for EF. If these are different than the normally used 1:1 mapping, importing fails. Just a thing to remember when you're trying to import your edmx.

Frans Bouma | Lead developer LLBLGen Pro