Skip to content

Commit

Permalink
Merge pull request #2527 from EnterpriseDB/release/2022-04-06
Browse files Browse the repository at this point in the history
Release: 2022-04-06
  • Loading branch information
nidhibhammar authored Apr 6, 2022
2 parents 1811059 + 9c5ba9e commit 99492de
Show file tree
Hide file tree
Showing 21 changed files with 234 additions and 283 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,17 @@ Following is an example of a strongly-typed ref cursor:

**Creating the Stored Procedure**

The following sample code creates a stored procedure called `refcur_inout_callee`. To create the sample procedure, invoke EDB-PSQL and connect to the Advanced Server host database. Enter the following SPL code at the command line:
The following sample code creates a stored procedure called `refcur_inout_callee`. It specifies the data type of the ref cursor being passed as an OUT parameter. To create the sample procedure, invoke EDB-PSQL and connect to the Advanced Server host database. Enter the following SPL code at the command line:

```Text
CREATE OR REPLACE PROCEDURE
refcur_inout_callee(v_refcur IN OUT SYS_REFCURSOR)
refcur_inout_callee(v_refcur OUT SYS_REFCURSOR)
IS
BEGIN
OPEN v_refcur FOR SELECT ename FROM emp;
END;
```

To use the above defined procedure from .NET code, you must specify the data type of the ref cursor being passed as an `IN` parameter, as shown in the above script.

The following C# code uses the stored procedure to retrieve employee names from the `emp` table:

```Text
Expand Down Expand Up @@ -65,7 +63,7 @@ namespace EDBRefCursor
command.Parameters.Add(new EDBParameter("refCursor",
EDBTypes.EDBDbType.Refcursor, 10, "refCursor",
ParameterDirection.InputOutput, false, 2, 2,
ParameterDirection.Output, false, 2, 2,
System.Data.DataRowVersion.Current, null));
command.Prepare();
Expand Down
6 changes: 3 additions & 3 deletions product_docs/docs/net_connector/5.0.7.1/01_release_notes.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: "Release Notes"
title: "Release notes"

---
The EDB .NET Connector provides connectivity between a .NET client application and an Advanced Server database server.
The EDB .NET Connector provides connectivity between a .NET client application and an EDB Postgres Advanced Server database server.

New features, enhancements, bug fixes, and other changes in the EDB .NET Connector `5.0.7.1` include:

| Type | Description |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Upstream Merge | Merged with the upstream Npgsql driver version 5.0.7. For more information about the merge updates, see <https://www.nuget.org/packages/Npgsql/5.0.7>. |
| Upstream merge | Merged with the upstream Npgsql driver version 5.0.7. For more information about the merge updates, see <https://www.nuget.org/packages/Npgsql/5.0.7>. |
| Enhancement | Support for .NET 5.0 and .NET Core 3.1 (earlier available as .NET Core 3.0). |
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
---
title: "Requirements Overview"
title: "Requirements overview"
---

<div id="requirements_overview" class="registered_link"></div>

The following section details the supported platforms for the EDB .NET Connector.
These are the supported versions and platforms for the EDB .NET Connector.

## Supported Server Versions and Platforms

The EDB .NET Connector is certified with Advanced Server version 9.6 and above.
The EDB .NET Connector is certified with EDB Postgres Advanced Server version 10 and later.

The EDB .NET Connector graphical installers are supported on the following Windows platforms:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
---
title: "The EDB .NET Connector - Overview"
title: "The EDB .NET Connector overview"

---

<div id="the_advanced_server_net_connector_overview" class="registered_link"></div>

The EDB .NET Connector is a .NET data provider that allows a client application to connect to a database stored on an Advanced Server host. The .NET Connector accesses the data directly, allowing the client application optimal performance, a broad spectrum of functionality, and access to Advanced Server features.
The EDB .NET Connector is a .NET data provider that allows a client application to connect to a database stored on an EDB Postgres Advanced Server host. The .NET Connector accesses the data directly, allowing the client application optimal performance, a broad spectrum of functionality, and access to EDB Postgres Advanced Server features.

The .NET Connector supports following frameworks:
The .NET Connector supports the following frameworks:

- .NET 5.0
- .NET Core 3.1
- .NET Standard 2.0 and 2.1


## The .NET Class Hierarchy
## The .NET class hierarchy

The .NET Class Hierarchy contains a number of classes that you can use to create objects that control a connection to the Advanced Server database and manipulate the data stored on the server. The following are just a few of the most commonly used object classes:
The .NET class hierarchy contains classes that you can use to create objects that control a connection to the EDB Postgres Advanced Server database and manipulate the data stored on the server. The following are just a few of the most commonly used object classes.

`EDBConnection`

The `EDBConnection` class represents a connection to Advanced Server. An `EDBConnection` object contains a `ConnectionString` that instructs the .NET client how to connect to an Advanced Server database.
The `EDBConnection` class represents a connection to EDB Postgres Advanced Server. An `EDBConnection` object contains a `ConnectionString` that instructs the .NET client how to connect to an EDB Postgres Advanced Server database.

`EDBCommand`

An `EDBCommand` object contains an SQL command that the client will execute against Advanced Server. Before you can execute an `EDBCommand` object, you must link it to an `EDBConnection` object.
An `EDBCommand` object contains an SQL command that the client executes against EDB Postgres Advanced Server. Before you can execute an `EDBCommand` object, you must link it to an `EDBConnection` object.

`EDBDataReader`

An `EDBDataReader` object provides a way to read an Advanced Server result set. You can use an `EDBDataReader` object to step through one row at a time, forward-only.
An `EDBDataReader` object provides a way to read an EDB Postgres Advanced Server result set. You can use an `EDBDataReader` object to step through one row at a time, forward only.

`EDBDataAdapter`

An `EDBDataAdapter` object links a result set to the Advanced Server database. You can modify values and use the `EDBDataAdapter` class to update the data stored in an Advanced Server database.
An `EDBDataAdapter` object links a result set to the EDB Postgres Advanced Server database. You can modify values and use the `EDBDataAdapter` class to update the data stored in an EDB Postgres Advanced Server database.
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
---
title: "Installing and Configuring the .NET Connector"
title: "Installing and configuring the .NET Connector"

---

<div id="installing_and_configuring_the_net_connector" class="registered_link"></div>

This chapter describes how to install and configure the EDB .NET Connector.

## Installing the .NET Connector

You can use the EDB .NET Connector Installer (available [from the EDB website](https://www.enterprisedb.com/software-downloads-postgres)) to add the .NET Connector to your system. After downloading the installer, right-click on the installer icon, and select `Run As Administrator` from the context menu. When prompted, select an installation language and click `OK` to continue to the `Setup` window.
Expand Down Expand Up @@ -64,7 +62,7 @@ Please see the following environment-specific sections for information about con



### Referencing the Library Files
### Referencing the library files

<div id="referencing_the_library_files" class="registered_link"></div>

Expand All @@ -88,7 +86,7 @@ To import a namespace into a C# application, write:

`using EnterpriseDB.EDBClient;`

### .NET Framework Setup
### .NET framework setup

The following sections describe the setup for various .NET versions.

Expand Down Expand Up @@ -216,7 +214,7 @@ Install dotnet-ef (using Command Prompt)

`dotnet tool install --global dotnet-ef`

**Sample Project**
**Sample project**

Create a new Console Application based on .NET 5.0 or NetCoreApp3.1

Expand All @@ -242,13 +240,13 @@ Command Prompt

`Open Tools``Command Line``Developer Command Prompt`

**Database First Scenario**
**Database first scenario**

Issue the following command to create Model Classes corresponding to all objects in the specified database:

`dotnet ef dbcontext scaffold Host=<HOST>;Database=<DATABASE>;Username=<USER>;Password=<PASSWORD>;Port=<PORT> EnterpriseDB.EDBClient.EntityFrameworkCore.PostgreSQL -o Models`

**Code First Scenario**
**Code first scenario**

Add code for defining a DbContext and create, read, update & delete operations.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ title: "Using the .NET Connector"

<div id="using_the_net_connector" class="registered_link"></div>

The sections that follow provide examples that demonstrate using the EDB object classes that are provided by the EDB .NET Connector that allow a .NET application to connect to and interact with an Advanced Server database.
These examples show how you can use the EDB object classes that are provided by the EDB .NET Connector that allow a .NET application to connect to and interact with an EDB Postgres Advanced Server database.

To use the examples in this guide, place the .NET library files in the same directory as the compiled form of your application. All of the examples are written in C# and each is embedded in an ASP.NET page; the same logic and code would be applicable with other .NET applications (WinForm or console applications, for example).
To use these examples, place the .NET library files in the same directory as the compiled form of your application. All of these examples are written in C#, and each is embedded in an ASP.NET page. The same logic and code applies to other .NET applications (WinForm or console applications, for example).

Please create and save the following `web.config` file in the same directory as the sample code. The examples make use of the `DB_CONN_STRING` key from this configuration file to return a connection string from the Advanced Server host.
Create and save the following `web.config` file in the same directory as the sample code. The examples make use of the `DB_CONN_STRING` key from this configuration file to return a connection string from the EDB Postgres Advanced Server host.

```text
<?xml version="1.0" encoding="utf-8"?>
Expand All @@ -21,4 +21,4 @@ Please create and save the following `web.config` file in the same directory as
</configuration>
```

An Advanced Server connection string for an ASP.NET web application is stored in the `web.config` file. If you are writing an application that does not use ASP.NET, provide the connection information in an application configuration file (such as `app.config`).
An EDB Postgres Advanced Server connection string for an ASP.NET web application is stored in the `web.config` file. If you're writing an application that doesn't use ASP.NET, provide the connection information in an application configuration file such as `app.config`.
Loading

0 comments on commit 99492de

Please sign in to comment.