views:

486

answers:

3

The platform is ASP.Net 3.5sp1, with an Oracle db. We've considered both MyGeneration and Entity Framework for time and convenience in the DataLayer (and maybe some base classes in the Business Layer).

My questions are:

1) Any pros and cons of using Entity Framework vs MyGeneration?

2) Any thoughts on using MyGeneration to generate code that would use Entity Framework?

I'm hoping for feedback from developers with experience in both, but any feedback is welcome.

Research we have done so far: We have a team member who is proficient in MyGeneration. We've watched several tutorial videos and read intro docs of Entity Framework.

Note: We are aware of the need to purchase an Entity Framework data provider for Oracle if Entity Framework is a part of the solution.

Also, we are aware of Entity-Spaces, but it does not appear to be a candidate for other reasons.

Thanks in advance!

+1  A: 

We have used custom made code generators which were generated C# code, SQL scripts and Entity Framework XML file from single UML diagram (made by IBM Relational Architect, and saved in XML file). In that way, you have total control of everything in your data layer. Of course, it is appropriate only if project is large enough and any other method is less applicable. It is not too difficult to make such generators, and in later stages you can enhance them to make additional functionalities, such as, for examples web services directly from UML diagram.

Nenad
+1  A: 

I must say that I don't have much experience with MyGeneration, but I have a lot of experience over the past 6 months building smaller apps with Entity Framework v1. From what I have went through with mapping Stored Procedures and the trouble around returning only Model objects from SP result in v1, I would suggest going with MyGeneration at this time if you are wanting the most viable option at the present time. There are still a lot of pain point in Entity Framework that are being addressed (fingers crossed) in v2.

Jeremy Sullivan
+1  A: 

If you have a MyGeneration export, then you might want to stick with that. As for EntityFramework. I have used it for a few small projects and think it is perfect when working with smallish systems (fewer than 10-15 tables).

Also, if you are debating all of this because nothing 'really' fits your solution, than consider one of my two alternative options:

  • Get a copy of CodeSmith and create your own templates. That way you can 'start' with EntityFramework (used by your generated code) and switch to something else if you have problems.
  • Consider .NET Tiers. It has worked quite well for my larger projects in the past.
JasonRShaver