DatasourceGetDatasourcesList Method |
Namespace: HiTSoftware.DBMoto.Application
using System; using System.Collections.Generic; using System.Text; using HiTSoftware.DBMoto.Application; using HiTSoftware.DBMoto.ObjectModel; namespace APISamples { /// <summary> /// This example shows how to retrieve the list of supported providers in DBMoto /// </summary> public class SampleProviderList { public static void Main() { // Return all supported datasources for DB2 UDB Datasource[] datasourceList = Datasource.GetDatasourcesList(DatabaseType.DB2UDB); // Print results for (int i = 0; i < datasourceList.Length; i++) { Console.WriteLine("Datasource name: '" + datasourceList[i].name + "' description: " + datasourceList[i].description); } // Return all supported providers for DB2 UDB Provider[] providerList = Provider.GetProvidersList(DatabaseType.DB2UDB); // Print results for (int i = 0; i < providerList.Length; i++) { Console.WriteLine("Provider name: '" + providerList[i].name + "' description: " + providerList[i].description); } } } }