1
Vote

No support for TransactionScope

description

I have an example project to demonstrate.
The following code will FAIL to invalidate the cache because of the ambient transactionscope. The solution for this can be found in a gist:
https://gist.github.com/codelinq/797390
            using (var tx = new TransactionScope())
            {
                var db = AppContext.Current.GetCurrentDatabaseContext();
                foreach (var product in db.ProductRepository)
                {
                    product.Name = Guid.NewGuid().ToString();
                }
                db.SaveChanges();
                tx.Complete();
            }

comments