|
|
1
4
我认为将NHibernate和webservices一起使用没有问题——我只是认为将实体本身发送到“另一边”不是一个好主意。 一种更好的方法是使用一组为该服务制作的DTO,这样您就不会遇到诸如序列化未知类型之类的问题。
有很多关于这方面的文章,其中一些: http://martinfowler.com/bliki/FirstLaw.html http://ayende.com/Blog/archive/2009/05/14/the-stripper-pattern.aspx http://elegantcode.com/2008/04/27/dtos-or-serialized-domain-entities/ DTOs vs Serializing Persisted Entities 作为it服务本身的补充说明,您可以使用Davy Brion在此处描述的方法进行明智的设计: http://davybrion.com/blog/2009/11/requestresponse-service-layer-series/ |
|
|
2
2
|
|
|
Nico Pizzo · 子查询上的nhibernate联接 8 年前 |
|
|
YMC · 无法在Nhb 4中构建只有特定字段可供选择的2个表联接 8 年前 |
|
|
Stu · 具有特定类型的字符串外键的NHibernate映射 8 年前 |
|
|
Zout · 为Hibernate的HiLo算法管理的列生成ID 8 年前 |