开发者

Using Non-default Constructors with NHibernate

开发者 https://www.devze.com 2023-03-18 23:16 出处:网络
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 t

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号