refactor npsql
addtest