TableAdapter: Code optimizations