improve model source code

use new method name.
add option to set custom pagination number.
use querystring generator.