Entity Framework Core – Use TransactionScope With Caution!

One of the new features of Entity Framework Core 2.1 is the support of TransactionScopes. The usage of a TransactionScope is very easy, just put a new instance in a using, write the code inside the block and when you are finished then call Complete() to commit the transaction: using (var scope = new TransactionScope()) { var groups = MyDbContext.ProductGroups.ToList(); scope.Complete(); …

Entity Framework Core – Use TransactionScope With Caution! Read More »