Web.config.install.xdt 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?xml version="1.0"?>
  2. <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  3. <!-- If connectionStrings tag is absent -->
  4. <connectionStrings xdt:Transform="InsertIfMissing">
  5. </connectionStrings>
  6. <!-- add entry if missing -->
  7. <connectionStrings>
  8. <add name="OracleDbContext" providerName="Oracle.ManagedDataAccess.Client" connectionString="User Id=oracle_user;Password=oracle_user_password;Data Source=oracle" xdt:Transform="InsertIfMissing" xdt:Locator="Match(name)" />
  9. </connectionStrings>
  10. <!-- If entityFramework tag is absent -->
  11. <entityFramework xdt:Transform="InsertIfMissing">
  12. </entityFramework>
  13. <!-- If entityFramework tag is present but if providers tag is absent -->
  14. <entityFramework>
  15. <providers xdt:Transform="InsertIfMissing">
  16. </providers>
  17. </entityFramework>
  18. <!-- remove existing entry -->
  19. <entityFramework>
  20. <providers>
  21. <provider invariantName="Oracle.ManagedDataAccess.Client" type="Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework, Version=6.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" xdt:Transform="Remove" xdt:Locator="Match(invariantName)" />
  22. </providers>
  23. </entityFramework>
  24. <!-- insert new entry -->
  25. <entityFramework>
  26. <providers>
  27. <provider invariantName="Oracle.ManagedDataAccess.Client" type="Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework, Version=6.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" xdt:Transform="Insert" />
  28. </providers>
  29. </entityFramework>
  30. </configuration>