I have an existing sql server database and want to add a new Entity Data Model which i want to point to that existing database.I want to use reverse engineer to make it 'code first' style. what is the advantage and disadvantage of this? What is the advantage and disadvantage of Database first approach on reverse engineering. I have stored pocedure in my database.
Asked
Active
Viewed 521 times
1 Answers
0
The database first approach is appealing but not sustainable in its current form. EF 7 will get rid of the EDMX file which stands in the middle. Code first will be used, event for existing database.
It seems that your intuition to go to CodeFirst and reverse engineer it is the right one. Tools have been created for such purpose. A good start is this SO question.
But to answer to your question: the main advantages for the code first (1) approach are:
- Easier to update to EF 7 when its released
- Make the extra effort to reverse engineer and then, you'll save lots of time and troubles enjoying the Migration system
- Remove a graphical layer in Visual Studio (the EDMX) which is often slow and clumsy when the DB grows
(1) Side Note: in EF 7, it is still "database first" per say, meaning, the database already exists. It is just that the EDMX layer is not used anymore. There will be some language misunderstandings I think in the first months of EF 7.
-
Thanks @Askolein for you answer. Is there any support for linking with stored procedure using reverse engineering. Is this support multiple result set returned from a stored procedure. – user1740857 Aug 31 '15 at 17:01