💻Source Code: https://github.com/rd003/PostgressDapperDemo
Tools and technology used
- VS Code (editor)
- .Net 8
- Postgres
- Dapper
Let’s get started with creating the database first.
create database PersonDb;
Now, create a table within the database.
create table Person
(
Id serial primary key,
Name varchar(30) not null,
Email varchar(30) not null
);
To create a new project you need to run these commands in a sequence.
> dotnet new sln -o PostgressDapperDemo
> cd PostgressDapperDemo
> dotnet sln add .\PostgressDapperDemo\
> code . #this command will open this project in the vs code
Nuget packages
Install the following nuget packages.
[Read More]