Umbraco中根据ID获取IPublishedContent

Umbraco中根据ID来获取IPublishedContent 

在Umbraco网站上的 https://our.umbraco.com/documentation/Reference/Templating/Mvc/querying 可以看到基本的信息

这里我们再结合项目开发中情况详细说一下

通常的做法是 

var umbracoHelper = new UmbracoHelper(UmbracoContext.Current);
IPublishedContent content = umbracoHelper.TypedContent(nodeId);
原文地址:https://www.cnblogs.com/wphl-27/p/9564557.html