开发者

WCF RIA Entity Using Load Operation; How to Get Latest Database changes

开发者 https://www.devze.com 2023-03-23 04:42 出处:网络
this is a follow up from the following question WCF RIA : LoadOperation Not Refreshing Data LoadOperation<Clarifications> ClarificationsLP = context.Load(context.GetClarificationsQuery().Where(

this is a follow up from the following question

WCF RIA : LoadOperation Not Refreshing Data

LoadOperation<Clarifications> ClarificationsLP = context.Load(context.GetClarificationsQuery().Where(o => o.ProjectID == ((App)Application.Current).Project.ProjectID).OrderBy(o => o.RaisedOn), LoadBehavior.RefreshCurrent, false); ClarificationsLP.Completed += delegate
        {};

The code abo开发者_如何学编程ve works fine, it will return me any changes that may occur in the database outside of my application. Great! However it only returns me the new changes...what if an Item was deleted? How can I deal with this? This is an issue for me.

Any help is appreciated.

Thanks


if other application is deleting registrys, and you want to refresh it, so you need to clear the cache entitys and do the load operation.

0

精彩评论

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