Skip to content

Pagination in Entity Framework Core

mazafar-bd/Pagination

Repository files navigation

Pagination in EntityFramework Core

We can paginate any IQueryable or IQueryable we can find the package in nuget

Usage

step 1.

execute the sql script named 'paginationdb.sql' from Pagination.Sample.WebAPI project folder

step 2.

change the connection strings as your database.

step 3.

select Pagination.Sample.WebAPI for console debug from drop-down to see the tsql statement

or

run as iisexpress and change the .AddConsole(); to .AddDebug(); in startup.cs file to see the tsql in output window in visual studio

 private readonly ILoggerFactory _consoleLoggerFactory = LoggerFactory.Create(builder =>
        {
            builder
                .AddFilter((category, level) =>
                    category == DbLoggerCategory.Database.Command.Name
                    && level == LogLevel.Information)
                .AddConsole();
              //.AddDebug();
        });

step 4.

after run you will see the swagger window where you can tryout the APIs or you can use Postman

step 5.

you can uninstall the nuget package from Pagination.Sample.WebAPI project and add the reference from BS23.Pagination.EfCore project or vise versa

About

Pagination in Entity Framework Core

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published