What IsolationLevel should I use in my TransactionScopes for:
- Reading a single record and I may update that record. This record is independent of all other data in the database so I only need to lock that one record.
- Trying to read a single record. If no record exists, then create a record with that value in that table. This is independent of all other tables, but it needs to lock this table so another thread doesn't also find no record, and then add the same record.
In the 2nd case, I think I need to lock the table to stop an insert on the table and any access on the record read, but allow reads of other records in the table and any access on any other table.
thanks - dave