I posted a blog about reading data from PostgreSQL in Xamarin forms actually almost ever thing same but now we need to add parameter and declare which type command we will use.
Let’s start coding with connecting database.
Before starting coding in Xamarin your database must be prepared for connection. First you must grant permission to your user name for database and tables. To grant permission your user name for database please read this and to grant permission your table please use below in your terminal;
GRANT ALL PRIVILEGES ON TABLE people TO admin;
Not: do not forget semicolon if you do not put semicolon your code will not work.
We do not need to do anything in PostgreSQL. Now we can write code in Xamarin let’s start.