namespace Connected.ServiceModel.Search; public static class SearchExtensions { public static IEnumerable WithPaging(this IEnumerable entities, SearchArgs args) { return entities.Skip((args.Paging.Index - 1) * args.Paging.Size) .Take(args.Paging.Size); } }