void OnFetchRows(System.Object sender, DevExpress.Xpf.Data.FetchRowsAsyncEventArgs e)
 {
     e.Result = Task.Run <DevExpress.Xpf.Data.FetchRowsResult>(() =>
     {
         var context   = new EntityFrameworkIssues.Issues.IssuesContext();
         var queryable = context.Issues.AsNoTracking()
                         .SortBy(e.SortOrder, defaultUniqueSortPropertyName: nameof(EntityFrameworkIssues.Issues.Issue.Id))
                         .Where(MakeFilterExpression(e.Filter));
         return(queryable.Skip(e.Skip).Take(e.Take ?? 100).ToArray());
     });
 }
 void OnFetchRows(System.Object sender, DevExpress.Xpf.Data.FetchRowsAsyncEventArgs e)
 {
     e.Result = Task.Run <DevExpress.Xpf.Data.FetchRowsResult>(() =>
     {
         using (var session = new DevExpress.Xpo.Session()) {
             var queryable = session.Query <XPOIssues.Issues.Issue>().SortBy(e.SortOrder, defaultUniqueSortPropertyName: nameof(XPOIssues.Issues.Issue.Oid)).Where(MakeFilterExpression(e.Filter));
             var items     = queryable.Skip(e.Skip).Take(e.Take ?? 100).ToArray();
             return(_DetachedObjectsHelper.ConvertToDetachedObjects(items));
         }
     });
 }