none
Configuring Oracle with ConfigurationSourceBuilder in Microsoft enterprise library RRS feed

  • Question

  • How to configure oracle database using ConfigurationSourceBuilder in Microsoft enterprise library?

    what should be the provider name for the oracle??

    Wednesday, July 26, 2017 12:20 PM

Answers

  • Hi Trunal Deshmuch,

    From the following document, we know that:

    The OracleDatabase class uses the OracleClientFactory provider. It is your responsibility to construct the appropriate type of Database class for the connection string.

    If you use a connection string for a data provider other than the ADO.NET SQL data provider or Oracle data provider, you can construct a GenericDatabase object. When you create a GenericDatabase object, you must supply the DbProviderFactory object.

    https://msdn.microsoft.com/en-us/library/dd139953.aspx

    Best regards,

    Cole Wu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, July 27, 2017 5:34 AM
    Moderator

All replies

  • Hi Trunal Deshmuch,

    From the following document, we know that:

    The OracleDatabase class uses the OracleClientFactory provider. It is your responsibility to construct the appropriate type of Database class for the connection string.

    If you use a connection string for a data provider other than the ADO.NET SQL data provider or Oracle data provider, you can construct a GenericDatabase object. When you create a GenericDatabase object, you must supply the DbProviderFactory object.

    https://msdn.microsoft.com/en-us/library/dd139953.aspx

    Best regards,

    Cole Wu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, July 27, 2017 5:34 AM
    Moderator
  • Hi Cole wu,

    Thank you.

    Yes i can do it using OracleDatabase class also.

    But i was trying for generic Database class  configuring it with ConfigurationSourceBuilder.

    And got my answer aslo as :

    new ConfigurationSourceBuilder().ConfigureData()
                        .ForDatabaseNamed("DatabaseName")
                        .ThatIs.AnOracleDatabase()
                        .WithConnectionString("connectionstring")
                        .AsDefault();

    Thank you

    Trunal 

    Thursday, July 27, 2017 6:05 AM