나는이 작업을하고 데이터를 얻습니다. 그러나 매번 I 페이지를 호출하면 GetAllWebExceptions가 호출되어 데이터베이스에서 웹 예외 레코드를 모두 가져옵니다. 페이징은 어떻게 구현되어야합니까? EntityFrameworks에서만 예제를 보았습니다. 누구든지 POCO와 함께 데이터 소스를 사용하는 좋은 예가 있습니까? 서비스에누구나 .NET RIA DomainDataService 및 POCO로 성공 했습니까?
<Grid x:Name="LayoutRoot" Background="White">
<ria:DomainDataSource x:Name="ErrorLogDataSource"
LoadMethodName="GetAllWebExceptions">
<ria:DomainDataSource.DomainContext>
<services:CMSContext />
</ria:DomainDataSource.DomainContext>
</ria:DomainDataSource>
<data:DataGrid x:Name="DataGridExceptions" ItemsSource="{Binding ElementName=ErrorLogDataSource, Path=Data}"
AutoGenerateColumns="True">
</data:DataGrid>
<dataControls:DataPager Source="{Binding Data, ElementName=ErrorLogDataSource}"
PageSize="20" />
:
[Query(PreserveName = true)] public IEnumerable GetAllWebExceptions() { return WebException.SelectAll("DATECREATED DESC"); }
에 브래드 에이 브람스 우수한 워크를 통해 살펴 보자 : HTTP : //silverlight.net/forums/p/100818/244081.aspx#244081 – Aligned