GiveCampUK/GiveCRM.Admin — pull request #30 by alastairs (2012-04-06 19:19:16+00:00)
Title: Issue #15: Email uniqueness

Fix issue #15, to prohibit duplicate email addresses from being registered.

There's a fair bit of refactoring here to introduce more of a Repository-based approach to GiveCRM.Admin, and we have nicely-injected Simple.Data connections as well. I'm not 100% happy with the implementation of this, where the connection is created by an injected IDatabaseProvider and returned from an interface method (see 938b7caa): I would prefer the connection object itself to be injected into the Repositories. Unfortunately, because of the dynamic approach taken by Simple.Data, it's not possible to achieve this, otherwise you have to craft an interface that implements the required calls on the dynamic object, which is just *horrible*.