将Lightswitch内部数据库更改为外部 [英] Change Lightswitch internal database to external

查看:138
本文介绍了将Lightswitch内部数据库更改为外部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio Lightswitch中开发了一个应用程序(如果VS2010 SP1中的Silverlight客户端有所不同),到目前为止已经完成了Lightswitch设计器中的所有数据库开发。



我现在想使用外部数据库,但不想重新创建整个应用程序,甚至只是屏幕。我已经脚本化了数据库,并在SQL Server中创建了一个副本,但是无法找到如何让Lightswitch使用这个外部数据库,而不再重新开始整个事情。



有一个简单的方法来更改连接字符串,以便我可以从我在哪里,但是有Lightswitch指向外部数据库而不是内部数据库。

解决方案

原来这是一个非常困难的事情。 Super Lightswitch-hacker David Baker看到了我在MSDN Lightswitch论坛上对这个主题发表的一篇文章,并表示愿意为我着想。它花了他几个,但我们到那里到底。

我不会推荐给任何人。我强烈建议从一开始就使用外部数据库。我不能看到使用内部的很多好处,如果你需要更多的控制,或想切换到外部,你有很大的问题。



希望这有助于某人。


I have been developing an application in Visual Studio Lightswitch (Silverlight client in VS2010 SP1 if it makes any difference), and so far have done all the database development in the Lightswitch designer.

I now want to use an external database, but don't want to recreate the whole app, or even just the screens. I have scripted the database, and have created a copy in SQL Server, but can't find out how to get Lightswitch to use this external database without starting the whole thing again.

Is there a simple way to change the connection string so that I can carry on from where I am, but have Lightswitch point at the external database instead of the internal one?

解决方案

Turns out this is a very difficult thing to do. Super Lightswitch-hacker David Baker saw a post I'd made on the subject in the MSDN Lightswitch forum, and kindly offered to have a go at it for me. It took him several goes, but we got there in the end.

I wouldn't recommend this to anyone. I would strongly recommend using an external database right from the start. I can't see much benefit from using the internal one, and if you ever need more control over it, or want to switch to an external one, you've got major problems.

Hope this helps someone.

这篇关于将Lightswitch内部数据库更改为外部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆