none
Is Entity Framework Code First suited for this scenario? RRS feed

  • Question

  •  have some basic knowledge of Entity Framework 4.1 Code First, but haven't used this in a production application yet. I am in the architecture phase of a web app and have made no firm commitments to a DAL except that Entity Framework will be used. I have not decided which EF approach: Model First, Database First, or Code First. I was wondering how suitable Code First, or the other two, would be for this scenario. Which of the 3 approaches would work best?

    Here is the scenario:

    • Developer does not have DBO permissions on the production database server. This means that the developer cannot run their own DDL/DML commands or scripts directly on the server. Instead, the DBA would have to execute the DDL/DML commands.
    • The model is expected to change over time, even after the database comes into existence. This means that if using Code First, the database would have to be dropped. To my knowledge, there is no way around this with Code First, and there is not out-of-the box means I know of, with the Code First framework, to maintain the data across re-modelings and drops. Would the DB be dropped in the case of Database First or Model First?

    It would be great if you anyone has had experience with a similar situation as mine.


    T. Webster
    Tuesday, October 11, 2011 12:41 PM

Answers

All replies