Open Closed

Adding Lookup table for a new field #4475


User avatar
0
moinahmed created

Hi,

I'm adding a new field in an existing table, and want to add a lookup table for it. Lookup table will have a few text entries a user can select from. One way I can think of adding a Lookup table is to use abp suite scaffolding, however, it generates a lot more code that looks an over kill for a table like that merely being setup once and will be update probably in years. Is there any simpler way for this in abp framework?

Thanks

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    it generates a lot more code that looks an over kill for a table like that merely being setup once and will be update probably in years.

    Maybe you can use Enum, it is easier than lookup table.

    For exmaple:

    https://github.com/abpframework/abp/blob/dev/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPost.cs#L34 https://github.com/abpframework/abp/blob/dev/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Blogs/BlogPostStatus.cs https://github.com/abpframework/abp/blob/dev/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Index.cshtml#L42

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.