I've read in the documentation that NHibernate requires classes to implement a default constructor that it can use when instantiating objects. I was wondering if it was possible to supply parameters to NHibernate and have it instantiate objects using a 开发者_运维百科particular constructor.
Currently I am getting around this by using ADO.NET and explicitly specifying parameters, but it would be nice if this could be handled automatically through some hibernate mapping property or method.
Try look here:
Working with NHibernate without default constructors
精彩评论