in src/rider/main/kotlin/com/jetbrains/rider/plugins/efcore/cli/api/EfCoreCliCommandFactory.kt [26:54]
fun create(command: DialogCommand, efCoreVersion: DotnetEfVersion): CliCommand {
return when (command) {
is AddMigrationCommand -> migrationsFactory.add(command.common, command.migrationName, command.outputFolder)
is RemoveLastMigrationCommand -> migrationsFactory.removeLast(command.common)
is GenerateScriptCommand -> migrationsFactory.generateScript(efCoreVersion, command.common,
command.fromMigration, command.toMigration, command.outputFilePath, command.idempotent, command.noTransactions)
is DropDatabaseCommand -> databaseFactory.drop(command.common)
is UpdateDatabaseCommand -> databaseFactory.update(efCoreVersion, command.common, command.targetMigration,
command.connection)
is ScaffoldDbContextCommand -> dbContextFactory.scaffold(efCoreVersion, command.common,
command.connection,
command.provider,
command.outputFolder,
command.useAttributes,
command.useDatabaseNames,
command.generateOnConfiguring,
command.usePluralizer,
command.dbContextName,
command.dbContextFolder,
command.scaffoldAllTables,
command.tablesList,
command.scaffoldAllSchemas,
command.schemasList,
)
else -> throw IllegalArgumentException("Unsupported command type: ${command::class.simpleName}")
}
}