我第一次在我的Sitecore 8.1项目中使用Glass Mapper。我正在尝试使用谷歌眼镜的搜索功能。我检查了谷歌眼镜( SitecoreAttributeConfigurationLoader("glass.sitecore7");"). )的教程,但它抛出了一个错误("var attributes = new http://glass.lu/Mapper/Sc/Tutorials/Tutorial25
任何人都有使用Sitecore 8.1的例子。
谢谢
发布于 2016-09-15 22:14:07
搜索示例被设置为使用fluent configuration,并且在应用程序启动时,该示例也会尝试使用pre-load all the models。
这是示例中的以下几行:
var attributes = new SitecoreAttributeConfigurationLoader("glass.sitecore7");
...
return new IConfigurationLoader[]{attributes, loader};您看到的错误是因为您没有将示例更新到您的特定项目。
您需要更新库的名称以匹配包含您的类的项目,例如
var attributes = new SitecoreAttributeConfigurationLoader("MyProject.Models");https://stackoverflow.com/questions/39512327
复制相似问题