Creating databases in ASP.NET MVC using data from an existing database

I have an existing ASP.NET MVC application with some sample data in a SQL Server database that is working fine.

Assuming I have all the necessary repositories and IOC in place, is there a tool that will extract data from a group of tables and “freeze” it into an object layout (possibly using an XML file to store data) so I can detach the database and use layout data for your unit tests?

+5
source share
3 answers

, , .

, unit test, . - , , , SQLite, ​​ . ORM, . , , SQL- (INSERT INTO...) , SQLite ( ), SQLite , , , , , SQLite unit test.

, ORM, MSSQL, , . , , . setup teardown ( ) , .

, (, , ), , , ( ), , .

+3

I don’t know how directly you do what you ask, but MSSQL supports exporting to CSV, Access and Excel. Although this requires you to change the level of access to data at your middle level, and, in addition, I do not feel that this answers your question:

"freeze-dry" it in the layout of the object

This I am not sure. Is it possible to simply restore a database backup on the same SQL server as the new database, or perhaps on the dev dev server?

0
source

All Articles