Open Closed

Question regarding DeleteAsyc #7319


User avatar
0
Sergei.Gorlovetsky created
  • ABP Framework version: v8.0
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

Hello,

Is there any other efficient way to execute the DeleteAsync without running a select query (line 21 )

The task here is to soft delete the record for the given documentID FYI: documentID and primary key of the table is different. So I am running a select query (line 21) to fetch the records and passing the file.id after that.

But I am wondering somehow, I can maybe remove the extra select query before running DeleteAsync()

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
    maliming created
    Support Team Fullstack Developer

    hi

    There is no way to get a file without a select query.

    But you can consider executing a raw SQL to do this.

    https://learn.microsoft.com/en-us/ef/core/querying/sql-queries https://learn.microsoft.com/en-us/ef/core/saving/execute-insert-update-delete#executedelete

    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.