Skip to content

Commit

Permalink
Update src/OrchardCore/OrchardCore.ContentManagement.Abstractions/Con…
Browse files Browse the repository at this point in the history
…tentItemExtensions.cs

Co-authored-by: Hisham Bin Ateya <[email protected]>
  • Loading branch information
giannik and hishamco authored Jun 11, 2024
1 parent a06759a commit 265d2a8
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,13 @@ public static ContentItem Merge(this ContentItem contentItem, object properties,

return contentItem;
}

public static ContentItem ToContentItem(this JsonDynamicObject jsonDynamic)
{
var contentItem = new ContentItem();
var contentProperties = jsonDynamic.ToString();
contentItem.Merge(JObject.Parse(contentProperties));

return contentItem;
}
}
Expand Down

0 comments on commit 265d2a8

Please sign in to comment.