开发者

Filtering data with Microsoft Sync Framework

开发者 https://www.devze.com 2023-01-25 04:03 出处:网络
Context: I\'m working on a project that use Offline Application Architecture. Our client program has 2 modes: connected and disconnected. When user in disconnected mode, they will use their local data

Context: I'm working on a project that use Offline Application Architecture. Our client program has 2 modes: connected and disconnected. When user in disconnected mode, they will use their local database (SQL CE) for retrieving and 开发者_如何转开发storing data. When user connects to application server again, the local database will be synchronized with central database as well. The transport layer in this project is WCF, we implement a proxy class to expose SQLSyncProvider on client for Sync Framework to sync data.

Question: How could I implement data filtering with MSF? In our project, each client will has a role, and each role will have access to different number of tables as well as rows in table. As far as I know, MSF allows us to filter data with a parameter column however, the provision for users will be same. In my case, the provision for each user will be so different, it depends on user's role.

Thanks.


You can use adapter filters on server side, and can send some parameter to fetch data on client bases from client.

Client this.Configuration.SyncParameters.Add( new SyncParameter("@CustomerName", "Sharp Bikes")); Server SqlSyncAdapterBuilder

0

精彩评论

暂无评论...
验证码 换一张
取 消