Skip to main content

Posts

Showing posts with the label Nolock

EDMX - Nolock extenstion class

    public static class ExtenstionMethods     {         private static TransactionScope _TransactionScope { get { return new TransactionScope(TransactionScopeOption.Required, new TransactionOptions() { IsolationLevel = IsolationLevel.ReadUncommitted }); } }         public static List<T> ToListNoLock<T>(this IEnumerable<T> query)         {             using (_TransactionScope) { return Enumerable.ToList(query); }         }         public static IEnumerable<T> AsEnumerableNoLock<T>(this IEnumerable<T> query)         {             using (_TransactionScope) { return Enumerable.AsEnumerable(query); }  ...