public async Task<IHttpActionResult> Get(int? page = null, int pageSize = 10, string orderBy = nameof(Employee.Id), bool ascending = true) { if (page == null) return Ok(await EntityContext.Employees.ToListAsync()); var employees = await CreatePagedResults<Employee, EmployeeModel> (EntityContext.Employees, page.Value, pageSize, orderBy, ascending); return Ok(employees); }