Is it possible to select from a table which is currently locked by a script which updates thousads of records?
EDIT: As some posters suggested, I've tried following but it does not work. It still breaks when updating large amount of records
public static async Task<List<T>> ToListReadUncommittedAsync<T>(this IQueryable<T> query)
{
using (var scope = new TransactionScope(
TransactionScopeOption.Required,
new TransactionOptions
{
IsolationLevel = System.Transactions.IsolationLevel.ReadUncommitted,
}, TransactionScopeAsyncFlowOption.Enabled))
{
List<T> toReturn = await query.ToListAsync();
scope.Complete();
return toReturn;
}
}