why you just change the connection string in app.config file of your project?
just search your current user name in your solution, you will find the connection string there.
解决你的问题,最简单的就是 Code first而不是通过ef来 db first
因为ef会根据你选中的字符串连接,在配置里增加库名。这个配置我忘记在哪了,反正打开edmx应该能看见。
所以即使你换了字符串,但是edmx没有重新生成,依然还是会使用原来的库名
至于最简单的code first,就是你将 dbcontext,model都拷贝出来,就可以了。