Add sort to TableQueryRepository