Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Migrate from Plain Entities to Self-Tracking Entities? [closed]

I'm working in a project that uses .NET Entity Framework 4 with EntityObjects. Since we have found that we need to evolve into self-tracking entities for the remaining modules that haven't been implemented, I want to ask this:

1) Can we delete the existent plain entities and regenerate self-tracking entities from the database without modifying our currently written code using them?

2) If the answer of 1) is 'yes', is that easily done? How would you proceed to migrate from the first scheme to the second?

like image 271
JPCF Avatar asked Nov 14 '22 04:11

JPCF


1 Answers

Change the namespces of your existing POCO classes to the one you expect EF will generate and so that your references will be updated.Then delete old POCO classes and generate EF classesThen compile your solution

like image 197
Kamran Shahid Avatar answered Dec 26 '22 05:12

Kamran Shahid