📨
SlackClone
  • Introduction
  • Server
    • Server Introduction
    • Getting Started
      • Install .NET Core 3
      • Create a Project
      • Install Dependencies - Mongo
      • Install Dependencies - PostgreSQL
        • PostgreSQL Install - Windows
        • Connect to PostgreSQL DB - pgAdmin
    • API
      • Setup HotChocolate Server
      • Add Playground
      • Data Model - PostgreSQL
        • PostgreSQL Entities
        • Database Context
        • Queries
          • Filtering
          • Sorting
        • Mutations
        • Subscriptions
      • Data Model - Mongo
        • Mongo Entities
        • Queries
  • Authorization
  • Authentication
  • Error Handling
  • Testing
  • Backend Summary
  • Client
    • Client Introduction
    • Getting Started
      • Install Dependencies
      • Create Project
    • App
      • Routing
      • Queries
        • Pagination
        • Sorting
        • Filtering
      • Mutations
      • Subscriptions
      • Authentication
    • Frontend Summary
Powered by GitBook
On this page
  1. Server
  2. Getting Started

Install Dependencies - PostgreSQL

PreviousInstall Dependencies - MongoNextPostgreSQL Install - Windows

Last updated 5 years ago

Next we will install all packages that we will require for the backend when working with PostgreSQL data store. If you want to work with MongoDB go . We will build up the use of each but will install all of them in the project now.

dotnet add package HotChocolate
dotnet add package HotChocolate.AspNetCore
dotnet add package HotChocolate.AspNetCore.Playground
dotnet add package HotChocolate.AspNetCore.Subscriptions
dotnet add package HotChocolate.Subscriptions.InMemory
dotnet add package HotChocolate.Types
dotnet add package HotChocolate.Types.Filters
dotnet add package HotChocolate.Types.Sorting

dotnet add package Microsoft.EntityFrameworkCore
dotnet add package Microsoft.EntityFrameworkCore.Tools
dotnet add package Microsoft.EntityFrameworkCore.Design
dotnet add package Npgsql.EntityFrameworkCore.PostgreSQL

dotnet restore

The HotChocolate.AspNetCore package contains the ASP.NET core middle-ware for hot chocolate and also includes the Hot Chocolate query engine as a dependency.

The HotChocolate.AspNetCore.Playground package adds the IDE.

The HotChocolate.AspNetCore.Subcriptions package adds the capabilities to do subscriptions with the HotChocolate.Subscriptions.InMemory adding for it be in memory. Visit for using additional backends for subscriptions.

The HotChocolate.Types.Filterspackage adds the capabilities to do filtering on fields.

The HotChocolate.Types.Sorting package adds the capabilities to do sorting on fields.

The remainder of the packages add Entity Framework Core and the Npgsql driver for PostgreSQL.

here
GraphQL Playground
hotchocolate.io