简体   繁体   中英

how to use .mdf while developing

I use a .mdf database for my asp.net Mvc project. The project is on source control on a tfs.

When I debug the project, Visual Studio copies the database in to the debugmap. The problem is, when I debug next time, the changes (while testing the previous time) in the database are gone. The reason of this I know, Visual studio copies the original database again in to the debug map.

Can I change some settings in Visual studio to work always on the same database without copying the database after each debug session myself? So I can keep my modified records?

Or how do I have to work with my database while developing?

Greets

Yes you can. On the properties of your database in Visual Studio you can set 'copy to output folder' to 'only if newer'.

And because visually always works better than read(ally?):

图片!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM