How to Use .Net Entity Framework to Connect PostgreSQL Server in a C# Application

preview_player
Показать описание
In this video,

How to setup Entity Framework DB First to connect PostgreSQL server on Ubuntu virtual machine.
How to connect PostgreSQL from pgAdmin windows application to check connection and database.
How to use PostgreSQL entity framework database context in a c# console application.
How to make CRUD "Create,Read,Update,Delete" operations on PostgreSQL database with .Net Core EntityFramework DB Context.
How to create a very basic c# web api controller for crud operations on postgresql


Related Links
----------------------


Reminders
------------------
Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.10"
Microsoft.EntityFrameworkCore.Design
Microsoft.EntityFrameworkCore.Tools

dotnet --version
dotnet tool install --global dotnet-ef
dotnet ef dbcontext scaffold "Host=127.0.0.1;Port=5432;Database=testdb;Username=admin;Password=admin" Npgsql.EntityFrameworkCore.PostgreSQL -o Models


-f Force - To Reflect Changes to code after making changes on database
dotnet ef dbcontext scaffold "Host=127.0.0.1;Port=5432;Database=testdb;Username=admin;Password=admin" Npgsql.EntityFrameworkCore.PostgreSQL -o Models -f
Рекомендации по теме
Комментарии
Автор

thanks man, i've been grinding all weekend sifting through a lot of posts to explain the dotNET6 + database-first + outOfProcess-postgreSQL + MCV + API overview, but this walkthrough with that scaffold command was the needle in the haystack i was looking for! #learningCurve ...moving onto nginx!

orthodoxNPC
welcome to shbcf.ru