Installing and configuring Odp.net with NuGet (Oracle Data Provider for. NET)

Source: Internet
Author: User
Tags oracle developer

Objective

This paper deals with Odp.net and ODP. NET managed (managed) driver, the Entity framework of the managed drive these three parts of the download, installation, configuration.

1. Introduction

NuGet is a. NET Software Development Kit management tool that generates and uses these development packages, including non-Microsoft software development kits, such as odp.net. NuGet Gallery is the "warehouse" in which these development packages are stored and used.

By using Odp.net, managed drives, and odp.net, managed EF drivers, developers can quickly start application development for odp.net and EF. In Visual Studio, the actions for downloading, installing, and configuring Odp.net's related development packages are automated.

This article will create a new project, complete the installation of odp.net, and be able to run the EF6 application. Before you start this project, you do not even need to install odp.net, Oracle Client, Entity Framework separately .

Note: 32-bit ODT (Oracle Developer Tools for Visual Studio), please download from here. The ODT is used when using EF or some of the design-time features of Visual Studio, such as the TableAdapter Wizard. The odp.net, managed drives, etc. downloaded through NuGet are supported only at runtime and do not support design-time features.

2. Operating Environment

    • Visual Studio 2013 above,. NET Framework 4 or higher
    • Oracle Database 11g Release 2 or later
    • Note: You do not need to install the ODP separately before you begin. NET and EF, these will be in the actual operation of this article

Second, the new project

New project for the new console type, named NuGet, as follows:

Third, NuGet installation and configuration odp.net

1. Right-click References in the solution and select Manage NuGet Packages,

2. Select the Browse tab, enter "Oracle" in the Search box, select Oracle.manageddataaccess and Oracle.ManagedDataAccess.EntityFramework separately and install, as

Note that this step downloads the related assemblies that the development package relies on, such as Odp.net, Managed Driver and EF6, and installs the configuration automatically through NuGet.

In the installation process pops up the license statement terms, remember the point ' I Accept '.

3. See the small green icon on the side of the package to show that the installation is successful and you can close the NuGet window.

4. Expand references to verify that the odp.net and Entity Framework are properly loaded into the project and, if present, that the assemblies are downloaded and installed correctly.

5. Open app. config to check if these assemblies are automatically configured

Have you noticed? The odp.net and Entity Framework have been added to the configuration information. Managed odp.net does not require the installation of Oracle Client

6, the final step is to configure the database link, configuration information and your specific application environment. The sample configuration information has been added and you can change the configuration parameters based on your environment.

A, link description configuration information in the <dataSources> configuration section. Change the Host, Port, service_name information based on your database link description information. You can change the sampledatasource alias (assuming you changed to orcltest) to rename the configuration .

b, odp.net the connection character under the <connectionStrings> configuration section, modify the User Id and Password to connect to the database. The value of Data Source should be changed to the alias of the Link Description Information configuration section (This example should be orcltest)

At this point, the ODP. NET installation configuration is complete, you can write and run any odp.net and EF6 related applications.

Next, you'll learn how to use this environment for code first development.

Installing and configuring Odp.net with NuGet (Oracle Data Provider for. NET)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.