Orchard Custom Module - Model being picked up by NHibernate - Requiring virtual properties

谁说我不能喝 提交于 2019-12-04 17:13:02

Orchard auto-mapping configuration assumes that any class will be mapped if the following conditions are met:

  • the namespace ends with ".Models" or ".Records"
  • there is an Id property, with virtual accessors
  • the class is neither sealed nor abstract
  • the class doesn't implement IContent or inherits from ContentPartRecord

So if you prevent any of those criteria from being true, you should be good. For instance, defining your classes in a namespace not ending with .Models or .Records should be sufficient.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!