Ejemplo n.º 1
0
        public void TestMethod2()
        {
            var repository = new PersonsRepository(connectionString);
            var result     = repository.LoadPagedAll("cl", 0, 5, "FirstName", "ASC");

            Assert.IsNotNull(result);

            Console.WriteLine($"{result.Count}");
            foreach (var person in result.Items)
            {
                Console.WriteLine($"{person.FirstName} {person.LastName}");
            }
        }
 // GET api/values
 public PaginationResult <Person> Get(string lastNameFilter, int pageIndex, int pageSize, string sortColumn = "LastName", string sortDirection = "Asc")
 {
     return(_personsRepositoy.LoadPagedAll(lastNameFilter, pageIndex, pageSize, sortColumn, sortDirection));
 }