首先 建立SL4项目的时候记得把那个RIA的选项钩上

其次,建立自定义DomainService 继承DomainService即可

调用示例 :

private DomainContext DomainContext = new DomainContext();

返回IEnumerable<T> 的

EntityQuery<T> Query = DomainContext.GetQuery(start,count);
DomainContext.Load(Query, this.OnLoaded, null);

private void OnPicturesLoaded(LoadOperation<T> loadOperation)
     {

    }

 

返回Int的

InvokeOperation<int> getCount = DomainContext.GetCount();
getCount.Completed += new EventHandler(getCount_Completed);

private void getCount_Completed(object sender, EventArgs e)
        {
        }

 

相关文章:

  • 2021-07-04
  • 2021-11-28
  • 2021-08-16
  • 2021-12-06
  • 2022-02-19
  • 2021-07-14
猜你喜欢
  • 2021-12-07
  • 2021-10-02
  • 2022-02-03
  • 2022-01-10
  • 2021-08-26
相关资源
相似解决方案