Implement Pagination in ASP.NET Core 2.1 Web API
问题 I searched, but did't really found articles on how to implement pagination logic in an ASP.NET WebAPI Core 2.1 application... I have the following [Route("api/[controller]")] [ApiController] [EnableCors("AllowMyOrigin")] public class EntriesController : ControllerBase { private readonly EntriesContext _context; public EntriesController(EntriesContext context) { _context = context; if (_context.Entries.Count() == 0) { _context.Entries.Add(new Entry { From = "default", To = "default" });