Improving Developer Experience: Updated EDB .NET Connector Now Published on NuGet

March 15, 2024

This blog was co-authored by EDB Senior Principal Eric McCormack.

Our recent update of the EDB .NET Connector, now available on the NuGet packet manager, underscores our dedication to streamlining Postgres deployment and maintenance processes for developers. The EDB .NET Connector facilitates connectivity between .NET applications and the EDB Postgres Advanced Server (EPAS) product that delivers unrivaled Oracle compatibility features, as well as advanced security features like Transparent Data Encryption (TDE), Data Redaction, Privilege Analysis, and EDB Audit.

With NuGet publishing, EDB customers working within the .NET ecosystem can take advantage of seamless external dependency management offered by the NuGet package manager, a familiar tool for .NET developers. NuGet offers numerous benefits to developers, including automatic copying of binaries and satellite assemblies alongside customer binaries. Developers can integrate NuGet seamlessly into their development workflow, including continuous integration and deployments, given its native integration within the .NET ecosystem. The NuGet Gallery serves as the central package repository for both package authors and consumers.

As a result, dependency management is streamlined with NuGet, ensuring automatic .NET SDK version matching.

NuGet distribution provides an additional avenue for accessing the EDB .NET Connector, complementing repository downloads without replacing them.

Discover more about accessing the EDB .NET Connector on NuGet through this technical blog.

In-place EDB .NET Connector availability

EDB .NET Connector is packaged as an installer, extracting all binaries in version-specific directories, which enables referencing the assemblies on a file-based approach. Developers and IT teams must ensure those binaries and their satellite assemblies are always copied, along with the customer binaries.

Currently, EPAS customers download the EDB .NET Connector from our repository

The benefits of .NET Core adoption

As .NET Core adoption surges via migrations from the .NET Framework (or net new adopters), EDB customers can leverage NuGet for dependency management during development, testing, and deployment phases.

Developers, already accustomed to using NuGet for acquiring dependencies, can now access the EDB .NET Connector seamlessly, thanks to recent integration efforts with .NET SDK tools.

NuGet package management automates the retrieval of external dependencies like the EDB .NET Connector during builds, facilitating sandbox builds, testing, and deployment without special privileges.

This integration simplifies the development process, allowing developers to focus on coding while ensuring efficient dependency management.

EDB packages now published on NuGet

As seen in the exhibit below, the following EDB packages are published on Nuget.org under the EnterpriseDB profile:

These packages are also summarized in the table that follows.

EDB package

Description

EnterpriseDB.EDBClientCore EDB .NET Connector
EnterpriseDB.EDBClient.
DependencyInjection
Dependency Injection helpers for EDB .NET Connector
(.NET Core only)
EnterpriseDB.EDBClient.
EntityFrameworkCore.PostgreSQL
Entity Framework Core driver
(.NET Core only)
EnterpriseDB.EDBClient.
Json.NET
Json.NET plugin for EDB .NET Connector, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
EnterpriseDB.EDBClient.
NodaTime
NodaTime plugin for EDB .NET Connector, allowing mapping of PostgreSQL date/time types to NodaTime types.
EnterpriseDB.EDBClient.
NetTopologySuite
NetTopologySuite plugin for Npgsql, allowing mapping of PostGIS geometry types to NetTopologySuite types.
EnterpriseDB.EDBClient.
EntityFrameworkCore.PostgreSQL.NetTopologySuite 
NetTopologySuite PostGIS spatial support plugin for PostgreSQL/EDB .NET Connector Entity Framework Core provider.
(.NET Core only)
EnterpriseDB.EDBClient.
EntityFrameworkCore.PostgreSQL.NodaTime 
NodaTime support plugin for PostgreSQL/EDB .NET Connector Entity Framework Core provider.
(.NET Core only)

Developer experience

The steps required for a developer to reference the EDB .NET Connector using NuGet packages are defined in the subsections that follow.

In a windows terminal prompt, navigate to the solution directory and type: 

dotnet add package EnterpriseDB.EDBClient

This will download the package from nuget.org and automatically choose the binaries matching your project target framework.

As an alternative, you can add the package directly from Visual Studio IDE:

1. Add package : right click the solution and choose “Manage NuGet Packages for Solution…” 

2. In the NuGet window, go to “Browse” tab and type “enterprisedb”, or “edb epas” for example to launch the search:

3. In the package results, 

  1. Choose “EnterpriseDB.EDBClient”, which is the namespace used by EDB .NET Connector.
  2. Check the projects where the reference is needed
  3. Make sure your .Net version is referenced by the package and click “Install”

4. Click “Apply” to confirm you want NuGet to perform the changes to your project

5. The EDB .NET Connector is now installed and ready to use!

Summary

Publishing our .NET connector on NuGet streamlines the integration process for developers, enabling them to easily incorporate EDB Postgres functionality into their projects with just a few simple steps. By leveraging NuGet’s package management system, developers can efficiently manage dependencies, ensure version compatibility, and simplify updates, all of which enhance the overall development workflow.

Share this

More Blogs