What is CRUD operation LINQ PART 3 With Example Code

The QueryExtensions class in the FreeWebApplication.Repository namespace appears to be an extension method class, used to extend the functionality of IQueryable < T > instances.Here's a breakdown of the class and its method



namespace FreeWebApplication.Repository {

    public static class QueryExtensions {

        public static IQueryable<T> PageBy<T>(this IQueryable<T> items, int pageNumber, int pageSize)

    {

        return items.Skip((pageNumber - 1) * pageSize).Take(pageSize);

    }

}

}