Provider Enumeration
•Cada provider tem um nome
–System.Data.SqlClient, System.Data.OracleClient
–
•Recebe a lista de Providers instalados
•DataTable dt = DbProviderFactories.GetFactoryClasses()
•DbProviderFactory factory =
•DbProviderFactories.GetFactory(dt.Rows[x])
•– ou –
-DbProviderFactory factory =
• DbProviderFactories.GetFactory(
• dt.Select("InvariantName='System.Data.SqlClient'")
• [0]["InvariantName"].ToString());
•
•
•