This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I am using MVC3 and I registered my model via LightSpeedEntityModelBinder.Register(typeof(EntitiesUnitOfWork).Assembly). During the post back of a form I got this exception: When I remove the LightSpeedEntityModelBinder.Register(..) call, everything is fine and the excpected valdiation error (a missing association to a required Entity) is displayed. Reading your documentation, I understand that the LightSpeedMvcValidatorProvider transform the LightSpeed valdiation attributes the DataAnnotation equivalent. But what is the "improved experience" mentioned at the documentation for the LightSpeedEntityModelBinder? |
|
|
Hi Sörnt, The advantage of using the custom model binder is that it handles any validation errors correctly rather than the DefaultModelBinders approach of just sucking out the entire contents of the Errors property as a single string. The alternative is subclassing the DefaultModelBinder which is also mentioned later on in the same section of the guide (Model Binding for LightSpeed Entities). In relation to the exception you are seeing, is there a repro you could provide for this? We would be keen to look at getting that fixed up of course :)
Thanks, Jeremy |
|
|
Hi Jeremy, The Bootstrapper.initializeMvcInfrastructure() registers the LightSpeedEntityModelBinder. Regards, |
|
|
Hi Sörnt, The issue isnt actually occuring for me here following through those steps, instead I am just seeing the validation message indicate I need to fill out a name and if I fill out the name it completes fine. We have been shuffling things around recently (for example I notice the binder was in its old namespace) so would you be able to grab the next nightly build and let us know if solves the problem you are seeing?
Thanks! Jeremy
|
|
|
The latest version fixes the error. Thanks |
|