silverlightwcf-ria-servicesdomainservicesdomaindatasource

DomainDataSource + DomainService


Is it possible to use the DomainDataSource control with a plain DomainService? I want to page/sort non-entity data.


Solution

  • Yes, if you build your DomainService, it will become available as a DomainContext. then you can use it inside your DomainDataSource.DomainContext property. A simple example from MSDN

    <riaControls:DomainDataSource Name="source" AutoLoad="True" QueryName="GetProducts">
        <riaControls:DomainDataSource.DomainContext>
            <domain:ProductDomainContext />
        </riaControls:DomainDataSource.DomainContext>
    </riaControls:DomainDataSource>