Reputation: 26682
I'm working with an SQL Server database with about 50 tables and plenty of relationships between those tables. I have already written a backup and restore function which will retrieve all data from the model, export it to XML which it could then import again into a clean database. But maintaining this import/export is a lot of work when there are some major structural changes to the entity model. I want a more dynamic solution.
Is there a more dynamic solution to export data from an entity model and to import it back again into a clean database?
Oh, before I forget... I don't have direct access to the database itself, not it's connection. All I get and all I can use is this entity framework object...
Upvotes: 1
Views: 1668
Reputation: 3248
I would be passing this back to your server support team. Seems a bit strange for an app developer to have to worry about data backup/restore.
Upvotes: 2
Reputation: 4172
Have you tried the SQL Server Publishing Wizard? It creates a nifty formatted SQL file that can be easily moved between application, I've also also used (with some search&replace based on regular expression) to move data from SQL Server to Oracle...
Regards
Massimo
Upvotes: 1