❔ Update my entity models every time my database changes.
Hi,
I've got an application in Entity Framework and it shares the same database with another application but when the second application tries to update something in the database my models from my first application become desynced. Is there any way to see if the database changes and update the entities in order to sync?
Thanks.
3 Replies
thats what 'migrate' and the ef tool are for, i believe
Create a separate project for just your database entities and
DbContext
, reference it from the other projects
That way, both projects will always use the same database models, and they'll always be synced up with the databaseWas this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.