title: Pagination and filtering in TypeScript and TypeORM
body: <p>How can i create an function to pagination and filtering with typeorm?</p>
  <p>I use <code>queryBuilder()</code> but i don't how to create an function to divide the results into pages and result on one page.</p>
  <p>I try like this:</p>
  <pre><code>  async getPaginatedAndFilteringUsers(dto: PaginationUserDto): Promise&lt;User[]&gt; {
      
      const user = this.conn.getRepository(Employee)
        .createQueryBuilder('user ')
        .orderBy('user.id', dto.order)
        .skip(dto.rowsPerPage)
        .take(dto.page);
  
      return user;
    }
  </code></pre>
  <p>but it not work.</p>
  <p>I want to create an function with params like this:
  <code>localhost:3000/user?page=1&amp;rowsPerPage=15&amp;orderBy=DESC</code></p>
  <p>can someone tell me how can i do this with typeorm?</p>
  <p>thanks a lot for all help :)</p>