The fundamental issue here seems to be one of the following:
- Contextual validation rules are being expressed as invariants
- Entities with unsatisfied invariants are being prematurely created/validated
I would suggest that you don't attempt using Model Binders to instantiate and validate types for which all invariant information isn't obtainable from the Http request. In the case of LogOn, the only information you have is the user's name and password. Therefore, LogOn shouldn't expect a User type, but rather the username and password, perhaps encapsulated in a Credentials type.
Derek Greer
2009-10-17 18:18:08