设计思路:数据导入到对应表需要单独操作,每次操作的逻辑基本一致,所以操作逻辑可以放在基类中,子类继承。设计如下: using System; public interface IImportData { bool ImportData(); } public class SQLite2SqlServer : IImportData { public virtual bool ImportData() { // TODO: implement bool isSuccessful = true; dedestinationTableName = Destination; using (SQLiteDataReader reader = SQLiteHelper.ExecuteReader(SQL_SQLite)) using (System.Data.SqlClient.SqlBulkCopy bulkCopy = new System.Data.SqlClient.SqlBulkCopy(PubConstant.ConnectionString)) { { bulkCopy.DestinationTableName = Destination; try