You should use an ORM instead (Entity Framework, Dapper, etc...)