First, we're going to install Postgres. This will be the database that the app uses to store data. Here is the link to instructions on installing postgres. Choose the operating system of your computer.
Follow this video to install PostgreSQL: How to Install PostgreSQL 16 on Windows 11
Durning the installation, set up password to postgres
Only install PostgreSQL, we do not need create database and table
You need to install dotnet 7 for MyFirstBlog and dotnet 5 for MyFirstBlogTests.
You can download the installer NET 7 and NET 5
Run backend code to navigate to http://localhost:5000/swagger/index.html
Open pgAdmin4, you will find a database called bvc-blog and in this database there is a table called post
Enter data into this post table. There is a data sample:
Id: 3F2504E0-4F89-11D3-9A0C-0305E82C3301
Title: Understanding C# class
Slug: understanding-csharp-class
Body: In this post, we explore the concept of class in C#.
CreateDate: 2023-05-15 10:00:00
Run Postman to send a request to http://localhost:5000/posts and you could get the response of posts data