Oracle recently released Oracle Data Access Component (odac) 11. 2 rel 4, which adds the Entity Framework
4.1 and 4.2 support. This allows. NET developers to use Oracle databases to apply this popular ORM tool and use LINQ to entities for data access without the need to write SQL statements.
Although the new Provider supports EF, it does not support the latest features, such as the code first and dbcontext introduced in EF 4.1. In addition
In addition to the support of EF, many other features are introduced in the latest version. For example, you can write data for Oracle databases.
WCF data services ). You can learn about all functions supported by odac from the official documentation.
The beta version of the provider has been released for some time. Developers who want to get started with Visual Studio toolset
Oracle and EF articles and simple tutorials.
The Entity Framework is designed with a provider model, which allows you to use third-party data providers. There is also an example provider that shows how to do this for non-SQL Server databases. Oracle is now Oracle
The database implements this tool.
Oracle is not the only non-SQL Server database with support for EF providers -- the ADO. net provider page lists all third-party providers for various databases, all of which support the Entity Framework.
View Original English text:Oracle provider gets EF support
In Visual Studio 2010 by default. the Entity Framework in the. Net project template and type template does not support Oracle databases. I found some third-party plug-ins in a circle, but it was not satisfactory after I tried it, oracle also has some official tools that can be extended to enable Entity Framework to support Oracle databases. Next, let's briefly talk about it.
First, you can prepare two items on the Oracle Official Website:
1. odac 11.2 release 3 (11.2.0.2.1) with Oracle Developer Tools for Visual Studio
: Http://www.oracle.com/technetwork/developer-tools/visual-studio/downloads/index.html
2. Oracle Data Access Components (odac) for Microsoft Entity Framework and LINQ to entities
: Http://www.oracle.com/technetwork/topics/dotnet/downloads/oracleefbeta-302521.html
Note: whether your operating system is 32-bit or 64-bit, the developer only installs 32-bit. Because vs is a 32-bit program, remember this, 64-bit installation is still unavailable.
In addition, the Oracle official website wants to register a user.
After the environment is installed, we can use it:
1. Open Visual Studio 2010 and the project to use Entity Framework:
2. Select the new item in the test project:
3. Select the ADO. Net Object Data Model:
4. Select a database in the pop-up Wizard:
5. You can see the Oracle option in the new connection in step 2. If this item does not prove that the above tool is not installed, check it again:
5. Select the Oracle database and enter the database configuration information:
6. After the connection test is successful, you can confirm and complete the database configuration, and save the connection string:
7. Select the table for which the object is to be generated:
8. You can see that the same entity model is created with the SQL Server database:
Now you can write the program you want. I hope the above content will help you. Thank you!