Starts in:
1 DAY
21 HRS
49 MIN
6 SEC
Starts in:
1 D
21 H
49 M
6 S
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()


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

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06