JamesShuttler/PropertySiteDemo — pull request #10 by JamesShuttler (2013-09-17 02:28:06+00:00)
Title: User management

It is now possible to register as either a buyer or seller.

While I could have extended the DDD approach to system users, I didn't think there would really be any benefit (at this moment in time) raising events when a new user is created. For this reason the `IUserService` component is a transaction-script that directly modifies the database.

Encryption and text generation services that the default implementation of `IUserService` depends on simply a very inflexible approach, whereby they are designed to be deployed as singletons and only use a single algorithm. It would not be very difficult to create an encryption service that can be initialised with any type that inherits from [System.Security.Cryptography.HashAlgorithm](http://msdn.microsoft.com/en-us/library/system.security.cryptography.hashalgorithm.aspx).

Also note that currently the only query operation that `DataContext` supports is existential with a predicate because this is all `UserService` requires. Because it returns a boolean which is convertible, translation of native data source results only supports types that implement `System.IConvertible`. The result translation logic will be updated when a feature needs to query complex types.