简体   繁体   中英

Does the Entity framework have anything like the sql OUTPUT clause for table queues?

I'm looking to create a queue that will be accessed by a multithreaded application. I've seen a few SO questions on this topic and suggest using tables and reference this article that suggests using the sql OUTPUT clause the does a read and delete in the same data call. This prevents multiple threads reading the same record.

I'm my case I'm using the entity framework and was wondering if anyone knows of a way to achieve the same results with the entity framework. Thanks in advance!

The article that you linked to creates stored procedures. EF supports stored procedures, so you can just call the stored procedures from EF.

EF also supports commands, so you could put the SQL in a command text and execute it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM