PostgreSQL

Radzen apps can connect to PostgreSQL support databases. All you need to do is specify the connection string. Radzen will discover the schema and will create a service which will expose the tables using Entity Framework context.

This tutorial will show you how to connect to a PostgreSQL database, read, add, update and delete data.

Prerequisites

Make sure you have installed .NET Core 3.1 SDK.

How to build the application

  • Step 1: Create and configure the application
  • Step 2: Add the PostgreSQL data source
  • Step 3: Automatically generate CRUD pages

Step 1: Create and configure the application

Create a new Radzen application by following the first step from the quickstart guide.

Step 2: Add the PostgreSQL data source

In this step we create a data source that connects to a PostgreSQL database.

  1. Open the application that you created in the previous step for editing.
  2. Click data to go to the My DataSources screen.
  3. Click new to add a new data source.
  4. Select PostgreSQL as data source type.
  5. Pick a Name for your data source.
  6. Enter the PostgreSQL connection info - server, database name, user and password.
  7. Click Next.
  8. Radzen will connect to the database and infer all tables and views. By default all tables are checked and you can choose/uncheck tables and/or table properties and views needed for your application.

Step 3: Automatically generate CRUD pages

  1. Check the Generate pages for CRUD operations check-box.Radzen can create pages only for tables with primary keys. For views only read page will be created.
  2. Radzen will open Edit and Add pages by default in dialogs. Uncheck the check-box if you want to have navigation instead.
  3. Click Finish.

You can now run the application to verify that you have full CRUD support.

Optionally you can data-bind a data grid component manually

  1. Drag-and-drop a data grid component from the toolbox.
  2. Use Data property wizard to select data source for the DataGrid.
  3. Build and run the application.

We are here for you

Making our users happy is always a priority for us.