具有本地数据选项的Silverlight 4 OOB [英] Silverlight 4 OOB with local data options

查看:71
本文介绍了具有本地数据选项的Silverlight 4 OOB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在,我有一个带有SQL Server后端的Winform应用程序. DAL由Linq to SQL组成.此应用程序的复杂性之一是需要离线运行.

Right now I have a Winform app with a SQL Server back end. The DAL is comprised of Linq to SQL. One of the complexities of this app is it's need to function offline.

我通过使用合并复制使本地SQL Express实例与中央SQL Server保持同步来实现此目的.我有一些逻辑可以检测到那里的连接状态,并适当地切换contexts连接字符串.

I have accomplished this by using Merge Replication to keep there local SQL Express instances in sync with a central SQL Server. I have some logic that detects there connection state and switches the contexts connection string appropriately.

因此,我的问题是,这是否也适用于Silverlight 4?从理论上讲,我将检测它们何时脱机并适当地切换连接.有想法吗?

My question is thus, will this also work with Silverlight 4? In theory, I would detect when they are offline and switch the connection appropriately. Thoughts?

实际上,这似乎是可能的.参见此处.

It seems this is, in fact, possible. See HERE.

我现在想了解的是,我是否可以使 EF L2S 与此一起工作,而不是像所示的RecordSets那样.

What I NOW would like to understand is if I could make EF or L2S work with this instead of RecordSets like it shows.

推荐答案

casperOne所说的是,在浏览器之外,Silverlight无法访问客户端上完整的数据库.最好的办法是在Silverlight 4的隔离存储区或少数几个可访问的文件夹之一中使用某种紧凑型数据库.我个人使用过siaqodb.com,但是您必须手动保持数据同步(这可能是一场噩梦.

What casperOne is saying is that out of browser Silverlight does not have access to a full fledged database on the client. The best that can be done is to use some sort of compact database either in the isolated storage or within one of the few accessible folders with Silverlight 4. I have personally used siaqodb.com , but you will have to keep the data synchronized manually (which can be a nightmare).

最近,我看到有人可以访问

More recently I have seen someone get access to a SQL compact database. However, there could be more ways of accessing data now. It has been some time since I've looked for a client side database for Silverlight.

这篇关于具有本地数据选项的Silverlight 4 OOB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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