Introduction
In previous Post on this topic, we started by publishing a .NET Core API to AWS Lambda function.
Today, we will extend the API and add more functionality to it (database operations) and then redeploy it to AWS Lambda and see how it goes.
Database Setup
We’ll be using Postgres database (AWS RDS Service) for data persistence. I’ve written few posts on this topic, which you check and these will provide you all the background information you need to work with PostgreSQL database in .NET Core:
- AWS Relational Database Service (RDS) – PostgreSQL in Cloud
- Fun with SQL using Postgres and Azure Data Studio
- Fasten your Data Layer with Dapper (A .NET Micro ORM)
Also, I will be using Dapper as an ORM, but feel free to use EntityFramework if you want to.
So, I have setup a PostgreSQL (RDS) database and created products and users tables as shown below:
As you can see that I’ve also populated some initial data in the database.
Subscribe to continue reading
Subscribe to get access to the rest of this post and other subscriber-only content.
Comments are closed.