1

I know enums are currently only available in the June 2011 CTP and won't be in 4.2. What other factors would make someone choose one or the other?

Nick Strupat
  • 4,928
  • 4
  • 44
  • 56

3 Answers3

2

Ladislav Mrnka has a great SO answer that breaks down the differences between DB First, Code First and Model First. I strongly suggest that you go read it and upvote it.

Besides that, I would only add the following points:

  • Even in the June 2011 CTP, Enum support is limited, so you might want to see if any of those issues are showstoppers for you. Update: EF5+ supports Enums with EF Designer and Code First.

  • If you are implementing EF against an Oracle DB, and you don't want to pay for a data provider, then you will be without Code First, as Oracle's own provider (still in beta) doesn't support it.

Edit: here is another comprehensive answer from Ladislav.

Community
  • 1
  • 1
bflow1
  • 969
  • 1
  • 10
  • 25
1

See Entity Framework Development Approaches in http://www.asp.net/entity-framework/tutorials/creating-an-entity-framework-data-model-for-an-asp-net-mvc-application

tdykstra
  • 5,880
  • 2
  • 23
  • 20
-2

Advantages : One common syntax ( LINQ / Yoda ) for all object queries whether it is database or not , Pretty fast if used as intended , easy to implement SoC , less coding required to accomplish complex tasks

Disadvantages : you have to think in a non traditional way of handling data , not available for every database

Disadvantage: If there is any schema change in database FE won’t work!!! You have to update the schema in solution as well!!!

Advantage: Its fast and straight forward using LINQ/FE objects For Add/Modify/Delete/Update.

Advantages:-Easy to map business objects (with drag & drop tables on environment). -It keeps a good performance when you work with a small / middle domain model.

Disadvantages:-It's limited when you work with a huge domain model. -Scalability.

James A Mohler
  • 11,060
  • 15
  • 46
  • 72