Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. Oracle.ManagedDataAccess.EntityFramework Nuget Package Version 21.4.0 README
  2. ============================================================================
  3. Release Notes: Oracle Data Provider for .NET, Managed Driver for Entity Framework 6
  4. October 2021
  5. This README supplements the main ODP.NET 21c documentation.
  6. https://docs.oracle.com/en/database/oracle/oracle-database/21/odpnt/
  7. TABLE OF CONTENTS
  8. *New Features
  9. *Installation and Configuration Steps
  10. *Installation Changes
  11. *Documentation Corrections and Additions
  12. *Entity Framework Tips, Limitations, and Known Issues
  13. New Features
  14. ============
  15. None
  16. Bug Fixes since Oracle.ManagedDataAccess.EntityFramework NuGet Package 21.3.0
  17. =============================================================================
  18. Bug 33402710 - INTEGER BASED PARTS OF GUID/RAW(16) ARE INCORRECTLY REVERSED
  19. Bug Fixes since Oracle.ManagedDataAccess.EntityFramework NuGet Package 19.7.0
  20. =============================================================================
  21. Bug 32749274 - ORA-12268 OR ORA-12269 IS ENCOUNTERED WHEN USING NATIVE ENCRYPTION (NAE)
  22. Bug 32874893 - SHOULD THROW ERRORS FOR INVALID CONFIGURATION IN ENCRYPTION AND CHECKSUM ALGORITHM LIST
  23. Bug 33074743 - CONNECTION FAILS WITH "ORA-12649: NATIVE SERVICES: UNKNOWN ENCRPYTION OR DATA INTEGRITY ALGORITHM" IF SET TO BEQ IN SQLNET.AUTHENTICATION_SERVICES
  24. Installation and Configuration Steps
  25. ====================================
  26. The downloads are NuGet packages that can be installed with the NuGet Package Manager. These instructions apply
  27. to install ODP.NET, Managed Driver for Entity Framework.
  28. 1. Un-GAC any existing ODP.NET for Entity Framework 21.x versions you have installed. For example, if you
  29. plan to use only the ODP.NET, Managed Driver for Entity Framework, only un-GAC existing managed ODP.NET for
  30. Entity Framework 21.x versions then.
  31. 2. In Visual Studio, open NuGet Package Manager from an existing Visual Studio project.
  32. 3. Install the NuGet package from an OTN-downloaded local package source or from nuget.org.
  33. From Local Package Source
  34. -------------------------
  35. A. Click on the Settings button in the lower left of the dialog box.
  36. B. Click the "+" button to add a package source. In the Source field, enter in the directory location where the
  37. NuGet package(s) were downloaded to. Click the Update button, then the Ok button.
  38. C. On the left side, under the Online root node, select the package source you just created. The ODP.NET for
  39. Entity Framework NuGet package will appear.
  40. From Nuget.org
  41. --------------
  42. A. In the Search box in the upper right, search for the package with id,
  43. "Oracle.ManagedDataAccess.EntityFramework". Verify that the package uses this unique ID to ensure it is the
  44. offical Oracle Data Provider for .NET, Managed Driver for Entity Framework downloads.
  45. B. Select the package you wish to install.
  46. 4. Click on the Install button to select the desired NuGet package(s) to include with the project. Accept the
  47. license agreement and Visual Studio will continue the setup. ODP.NET, Managed Driver will be installed
  48. automatically as a dependency for ODP.NET, Managed Driver for Entity Framework.
  49. 5. Open the app/web.config file to configure the ODP.NET connection string and local naming parameters
  50. (i.e. tnsnames.ora). Below is an example of configuring the local naming parameters:
  51. <oracle.manageddataaccess.client>
  52. <version number="*">
  53. <dataSources>
  54. <!-- Customize these connection alias settings to connect to Oracle DB -->
  55. <dataSource alias="SampleDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) " />
  56. </dataSources>
  57. </version>
  58. </oracle.manageddataaccess.client>
  59. 6. Modify the app/web.config file's connection string to create a DbContext your Entity Framework application
  60. will use. Below is an example of a configured DbContext.
  61. <connectionStrings>
  62. <add name="OracleDbContext" providerName="Oracle.ManagedDataAccess.Client"
  63. connectionString="User Id=hr;Password=hr;Data Source=MyDataSource"/>
  64. </connectionStrings>
  65. After following these instructions, ODP.NET, Managed Driver for Entity Framework is now configured and ready
  66. to use.
  67. NOTE: ODP.NET, Managed Driver may require its own configuration. Please consult the component's README.
  68. Installation Changes
  69. ====================
  70. The following app/web.config entries are added by including the "Official Oracle ODP.NET, Managed Entity Framework Driver"
  71. NuGet package to your application.
  72. 1) Entity Framework
  73. The following entry is added to enable Entity Framework to use Oracle.ManagedDataAccess.dll for executing Entity
  74. Framework related-operations, such as Entity Framework Code First and Entity Framework Code First Migrations against
  75. the Oracle Database.
  76. <configuration>
  77. <entityFramework>
  78. <providers>
  79. <provider invariantName="Oracle.ManagedDataAccess.Client" type="Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework, Version=6.122.21.1, Culture=neutral, PublicKeyToken=89b483f429c47342" />
  80. </providers>
  81. </entityFramework>
  82. </configuration>
  83. 2) Connection String
  84. The following entry is added to enable the classes that are derived from DbContext to be associated with a connection
  85. string instead to associating the derived class with a connection string programmatically by passing it via its
  86. constructor. The name of "OracleDbContext" should be changed to the class name of your class that derives from DbContext.
  87. In addition, the connectionString attribute should be modified properly to set the "User Id", "Password", and
  88. "Data Source" appropriately with valid values.
  89. <configuration>
  90. <connectionStrings>
  91. <add name="OracleDbContext" providerName="Oracle.ManagedDataAccess.Client" connectionString="User Id=oracle_user;Password=oracle_user_password;Data Source=oracle" />
  92. </connectionStrings>
  93. </configuration>
  94. Documentation Corrections and Additions
  95. =======================================
  96. None
  97. Entity Framework Tips, Limitations, and Known Issues
  98. ====================================================
  99. This section contains Entity Framework related information that pertains to both ODP.NET, Managed Driver and ODP.NET,
  100. Unmanaged Driver.
  101. 1. Interval Day to Second and Interval Year to Month column values cannot be compared to literals in a WHERE clause of
  102. a LINQ to Entities or an Entity SQL query.
  103. 2. LINQ to Entities and Entity SQL (ESQL) queries that require the usage of SQL APPLY in the generated queries will
  104. cause SQL syntax error(s) if the Oracle Database being used does not support APPLY. In such cases, the inner exception
  105. message will indicate that APPLY is not supported by the database.
  106. 3. ODP.NET does not currently support wildcards that accept character ranges for the LIKE operator in Entity SQL
  107. (i.e. [] and [^]). [Bug 11683837]
  108. 4. Executing LINQ or ESQL query against tables with one or more column names that are close to or equal to the maximum
  109. length of identifiers (30 bytes) may encounter "ORA-00972: identifier is too long" error, due to the usage of alias
  110. identifier(s) in the generated SQL that exceed the limit.
  111. 5. An "ORA-00932: inconsistent datatypes: expected - got NCLOB" error will be encountered when trying to bind a string
  112. that is equal to or greater than 2,000 characters in length to an XMLType column or parameter. [Bug 12630958]
  113. 6. An "ORA-00932 : inconsistent datatypes" error can be encountered if a string of 2,000 or more characters, or a byte
  114. array with 4,000 bytes or more in length, is bound in a WHERE clause of a LINQ/ESQL query. The same error can be
  115. encountered if an entity property that maps to a BLOB, CLOB, NCLOB, LONG, LONG RAW, XMLTYPE column is used in a WHERE
  116. clause of a LINQ/ESQL query.
  117. 7. An "Arithmetic operation resulted in an overflow" exception can be encountered when fetching numeric values that
  118. have more precision than what the .NET type can support. In such cases, the LINQ or ESQL query can "cast" the value
  119. to a particular .NET or EDM type to limit the precision and avoid the exception. This approach can be useful if the
  120. LINQ/ESQL query has computed/calculated columns which will store up to 38 precision in Oracle, which cannot be
  121. represented as .NET decimal unless the value is casted.
  122. 8. Oracle Database treats NULLs and empty strings the same. When executing string related operations on NULLS or empty
  123. strings, the result will be NULL. When comparing strings with NULLs, use the equals operator (i.e. "x == NULL") in the
  124. LINQ query, which will in turn use the "IS NULL" condition in the generated SQL that will appropriately detect NULL-ness.
  125. 9. If an exception message of "The store provider factory type 'Oracle.ManagedDataAccess.Client.OracleClientFactory'
  126. does not implement the IServiceProvider interface." is encountered when executing an Entity Framework application with
  127. ODP.NET, the machine.config requires and entry for ODP.NET under the <DbProviderFactories> section. To resolve this
  128. issue by adding an entry in the machine.config, reinstall ODAC.
  129. 10. Creating a second instance of the context that derives from DbContext within an application and executing methods
  130. within the scope of that context that result in an interaction with the database may result in unexpected recreation of
  131. the database objects if the DropCreateDatabaseAlways database initializer is used.
  132. More Informations: https://entityframework.codeplex.com/workitem/2362
  133. Known Workarounds:
  134. - Use a different database initializer,
  135. - Use an operating system authenticated user for the connection, or
  136. - Include "Persist Security Info=true" in the connection string (Warning: Turning on "Persist Security Info" will cause
  137. the password to remain as part of the connection string).
  138. Copyright (c) 2021, Oracle and/or its affiliates.