sharp architecture question, nhibernate validation

Posted by csetzkorn on Stack Overflow See other posts from Stack Overflow or by csetzkorn
Published on 2010-03-26T11:26:18Z Indexed on 2010/03/26 11:33 UTC
Read the original article Hit count: 435

Filed under:

I have marked certain properties in my domain object for the nhibernate validation 'framework'.

If I do this in my controller explicitly:

ICollection<IValidationResult> test =  bla.ValidationResults();

I get the validation errors which I could add to my asp.net mvc modelstate

ideally, i would like an exception being thrown during:

bla = blaRepository.SaveOrUpdate(bla);

if i try to save or update the domain object. why is this not happening? my domain object bla derives from Entity.

do I have to register something somehow?

Thanks.

christian

© Stack Overflow or respective owner

Related posts about nhibernate