Umbraco 服务问题 - "Nullable object must have value"

Issue with Umbraco Service - "Nullable object must have value"

我们正在实施不同的 Umbraco 服务,使用 ApplicationContext 从 Umbraco 后端提取数据。它总是在 return 中给出 null 或在调用服务方法本身时给出异常 "Nullable object must have value" 。 这可能是因为 nodeUser 列中的 NULL umbracoNode table。如果我在数据库中更新 0,我的服务运行良好。但如果我在 Umbraco 后端执行保存,它会再次将 nodeUser 设置为 NULL。

这是我的代码:

var contentService = ApplicationContext.Current.Services.ContentService;

var contentTypeService = ApplicationContext.Current.Services.ContentTypeService;

var contentType = contentTypeService.GetContentType("blog");

var contents = contentService.GetContentOfContentType(contentType.Id);

谁能帮我摆脱困境?

将 UmbracoCms.Core 的版本升级到最新版本解决了问题。