Generating CRUD Pages From an Existing Database Table

If you have an existing database table, you can generate the entities using ABP Suite and create a CRUD page based on those entities, let's get started.

Create/open your project

abpsuite

Either create a new project or open an existing project that's based on an app or module template.

Generate the Entities

After opening the project in ABP Suite, scroll down to the bottom and click the Load Entity From Database button:abpsuite2

This will open the window seen below, choose the data source of your database and add the connection string of your project:abpsuite3

Click the lightning icon to test the connection, and then connect to the database by clicking connect, and this should extend the window as the following window:abpsuite4

Uncheck the Id property since it automatically gets generated, it'll cause an error if we generate it twice, then click OK:abpsuite5

After that, make sure the primary key type is selected, then click Save and generate:abpsuite6

The following GIF is a summary of the previous steps: SUTIE_GIF

Run the Project!

After that, run the project and watch the magic! An easy CRUD app using the entities from an existing database table!SUITE_GIF_2

What's next?

Accessing source code of modules

Contributors


Last updated: April 15, 2022 Edit this page on GitHub

Was this page helpful?

Please make a selection.

To help us improve, please share your reason for the negative feedback in the field below.

Please enter a note.

Thank you for your valuable feedback!

Please note that although we cannot respond to feedback, our team will use your comments to improve the experience.

In this document
Community Talks

Building Modular Monolith Applications Using .NET and ABP Framework

17 Oct, 17:00
Online
Watch the Event
Mastering ABP Framework Book
Mastering ABP Framework

This book will help you gain a complete understanding of the framework and modern web application development techniques.

Learn More