Mapping tables in Entity Framework
-
Sunday, February 17, 2013 2:13 AM
I performed the following task at the below link provided which worked fine for me using Entity Framework 5.0 with Visual Studio 2010.
However, if the database schema needs to be refreshed, how do you prevent the changes you made to the designer from getting lost and doing them all over again?
This is not going to be pretty for a database that has lots of tables....
Bill Yeager
All Replies
-
Monday, February 18, 2013 8:33 AMModerator
Hi Bill,
Welcome to the MSDN forum.
I think you are using database approach. I tested the sample based on the article you provided. I tried to refresh Customer and CustomerAddress tables. The changes is preserved. Please back up your solution and try to refresh it.
Best Regards,
Alexander Sun [MSFT]
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- Marked As Answer by Alexander SunModerator Monday, March 11, 2013 4:13 PM
-
Thursday, February 21, 2013 6:35 PMModerator
Hi Bill,
Is what Alexander said working for you? If so then I'll mark this one as done, otherwise I'll look into it for you.
We are seeing a lot of great Entity Framework questions (and answers) from the community on Stack Overflow. As a result, our team is going to spend more time reading and answering questions posted on Stack Overflow. We would encourage you to post questions on Stack Overflow using the entity-framework tag. We will also continue to monitor the Entity Framework forum.
-
Friday, February 22, 2013 12:56 AM
That worked, but if I need to regenerate my database model from my physical database, the changes I made would be lost....
As a matter of fact, any changes that you make to the model would be lost if you have to regenerate it. I love EF, but this is an issue which I'm sure why a lot of companies don't use it. One little change to the database could throw your whole model off....
How can I prevent this?
Bill Yeager

