次のようにコンテンツ アイテムのインスタンスを作成しました。
ContentItem ci = _orchardServices.ContentManager.New("ContentTypeA");
_orchardServices.ContentManager.Create(ci, VersionOptions.Published);
ci.As<SomeContentPart>().SomeAttr = value;
...
_orchardServices.ContentManager.Publish(ci);
別の方法では、コンテンツタイプを変更する必要があり、次のことを試しましたが成功しませんでした:
ci.TypeDefinition = _contentDefinitionManager.GetTypeDefinition("ContentTypeB");
ci.ContentType = "ContentTypeB";
コンテンツ アイテムを再度クエリすると、そのコンテンツ タイプは「ContentTypeB」ではなく「ContentTypeA」のままです。
何か案は?