Backup and Restore through the Entity Framework

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?

  • Simulating MySql's password() encryption using .NET or MS SQL
  • Date format issue while importing from a flat file to an SQL database
  • Best way to represent a color in a SQL Database?
  • How to return all the free periods of time from an appointment set
  • SQL Server Equivalent of Bulk Collect in Oracle
  • Is there an open source SQL Server DB compare tool?
  • 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…

    2 Solutions collect form web for “Backup and Restore through the Entity Framework”

    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.

    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

    MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.