Skip to content

divyanshbhatia1/EFCore.PostgerSQL

Repository files navigation

Entity Framework Core

How to use Entity Framework Core with Postgre SQL database in ASP.NET Core

Steps to follow:

  • Add data project (Class Library .NET standard 2.1)
  • Add nuget package
    Npgsql.EntityFrameworkCore.PostgreSQL
  • Add entities and context in the project
  • Add API project
  • Add nuget package in API project
    Microsoft.EntityFrameworkCore.Tools
  • Add migrations using command
    Add-Migration 'InitialMigration'
  • Apply migrations using command
    Update-Database

How to use Entity Framework Core with SQL Server database in ASP.NET Core

Steps to follow:

  • Add data project (Class Library .NET standard 2.1)
  • Add nuget package
    Microsoft.EntityFrameworkCore.Tools
  • Add entities and context in the project
  • Add API project
  • Add nuget package
    Microsoft.EntityFrameworkCore.Tools
  • Add migrations using command
    Add-Migration 'InitialMigration'
  • Apply migrations using command
    Update-Database

About

Demo Entity Framework with Postgre SQL database

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages