GiveCampUK/GiveCRM — pull request #97 by nbarnwell (2012-04-07 08:01:21+00:00)
Title: Database connection creation moved to abstraction for IoC purposes

Previously each repository concrete instance would create it's own Simple.Data database object, which would mean each repository would have it's own database connection beneath that.

These changes mean the "database" is effectively now controlled by the IoC container with a "per web request" lifestyle. We can therefore wrap calls on multiple repository objects in TransactionScope without having the transaction promoted to a distributed transaction (which would require MSDTC to be active and severely harm performance).