Open Closed

DbContext Order By Extra Propeties Not Working #4970


User avatar
0
muhannad created

I want to order by the extra Propeties , I have a column in database Called RankOrder , I tried this

` order by user.GetProperty

`

its not working , any suggestions please

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

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

    Hi,

    You can try:

    .OrderBy(b => EF.Property<int>(b, "RankOrder"));
    

    You have to add RankOrder as a separate field of the table

    See: https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities#entity-extensions-ef-core

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    muhannad created

    Thnx , it worked

    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 23, 2026, 09:57
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.