02
01/12
关于NHibernate异常The following types may not be used as proxies
异常: The following types may not be used as proxies: NHibernateDemo.DataAccess.DomainObjects.Customer: method get_Name should be virtual NHibernateDemo.DataAccess.DomainObjects.PurchaseItem: method set_Id should be virtual..... 需要改的有两点: 例如:Customer.hbm.xml <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns=" urn:nhibernate-mapping-2.2"> <class name="NHibernateDemo.DataAccess.DomainObjects.Customer, NHibernateDe...