These projects were developed as part of the learning process for Avalonia and PostgreSQL.
MIT License
These projects were developed as part of the learning process for Avalonia and PostgreSQL.
We need to install the following packages in the Avalonia project:
To install Microsoft.EntityFrameworkCore.Design package using .NET CLI, run the following command:
dotnet add package Microsoft.EntityFrameworkCore.Design --version 9.0.0-preview.2.24128.4
To install Microsoft.EntityFrameworkCore.Design package using Package Manager, run the following command:
NuGet\Install-Package Microsoft.EntityFrameworkCore.Design -Version 9.0.0-preview.2.24128.4
To install Npgsql.EntityFrameworkCore.PostgreSQL package using .NET CLI, run the following command:
dotnet add package Npgsql.EntityFrameworkCore.PostgreSQL --version 9.0.0-preview.1
To install Npgsql.EntityFrameworkCore.PostgreSQL package using Package Manager, run the following command:
NuGet\Install-Package Npgsql.EntityFrameworkCore.PostgreSQL -Version 9.0.0-preview.1
This command is used for reverse engineering PostgreSQL databases and automatically generating model classes based on the existing database schema.
dotnet ef dbcontext scaffold "Host=0.0.0.0;Username=postgres;Password=password;Database=DataBaseName" Npgsql.EntityFrameworkCore.PostgreSQL --output-dir <Folder where you want to generate classes>
To overwrite existing classes, use the --force option.
dotnet ef dbcontext scaffold "Host=0.0.0.0;Username=postgres;Password=password;Database=DataBaseName" Npgsql.EntityFrameworkCore.PostgreSQL --output-dir <Folder where you want to generate classes> --force
dotnet tool install --global dotnet-ef --version 7.*