Top
Enterprise Postgres 17 SP1 Application Development Guide

4.2.3 Setting Up Entity Framework Core

Entity Framework Core is supplied as a NuGet package file. To install it locally, follow the procedure below.

Location of NuGet package

The EntityFramework Core NuGet package is stored in the following location.

  • LinuxLinux

    fujitsuEnterprisePostgresClientInstallDir/DOTNET/Npgsql.EntityFrameworkCore.PostgreSQL.8.0.2.nupkg
  • WindowsWindows(R)

    fujitsuEnterprisePostgresClientInstallDir\DOTNET\Npgsql.EntityFrameworkCore.PostgreSQL.8.0.2.nupkg
Add a local package source

Add a NuGet local package source if one does not exist.

  • LinuxLinux

    Add the above Nuget package location as a local package source.

    dotnet nuget add source fujitsuEnterprisePostgresClientInstallDir/DOTNET -n sourceName
  • WindowsWindows(R)

    1. Start Visual Studio, click [Tools] >> [Options] >> [NuGet Package Manager], and then select [Package Sources].

    2. Click [+] in the upper-right corner, and then set [Name] to "Local Package Source".

    3. Click […] and navigate to the folder above. Select this folder, and then click [OK].

Install the NuGet package

Install the NuGet package from the local package source.

  • LinuxLinux

    Add a package reference to the project file.

    dotnet add projectFilePath package Npgsql.EntityFrameworkCore.PostgreSQL
  • WindowsWindows(R)

    1. Start Visual Studio, click [Tools] >> [NuGet Package Manager] >> [Manage NuGet Packages for Solution].

    2. In the upper-right corner, select "Local Package Source" from [Package Source].

    3. Once the local package source is set, all available NuGet packages in this local location will be displayed. Select "Npgsql.EntityFrameworkCore.PostgreSQL", and then select the projects for which this package is to be installed.

    4. Click [Install].