Hi,
I need to get 1000 rows from a database, and at the same time tag them as 'in process'. This way, another thread can not take the same 1000 rows and process them as well.
With linq i do something like this:
msgs = (from m in database.messages where (m.status == MESSAGESTATUSINIT) select m).Take(1000).ToList();
ideally I would at the same time set the status to MESSAGESTATUSPROCESSING. Of course this MUST be atomic.
any ideas? Or is it back to SQL?
thanks!