public override String FromDataSet(DataSetConvertParams context, DataSet ds, params object[] args) { SqliteClient sqliteClient = _dataSetSqliteClientConverter.FromDataSet(context, ds); sqliteClient.OpenConnection(); String dbPath = args.Length > 0 ? args[0].ToString() : $"{ds.DataSetName}.db"; sqliteClient.BackupDatabaseToFile(dbPath); sqliteClient.CloseConnection(); return(dbPath); }
public override DataSet ToDataSet(DataSetConvertParams context, String input) { String dbPath = $"Data Source={input};Version=3;"; SqliteClient sqliteClient = new SqliteClient(dbPath); sqliteClient.OpenConnection(); DataSet ds = sqliteClient.GetDataSet(); ds.DataSetName = Path.GetFileName(input); sqliteClient.CloseConnection(); return(ds); }