ContentService.Insert Method
- Namespace:
- Weavy.Core.Services
- Assembly:
- Weavy.Core.dll
Overloads
Insert |
Inserts a new content item in the root of the specified App. |
Insert |
Inserts a new content item as child to the specified parent. |
Insert(T, App, IEnumerable, bool)
Inserts a new content item in the root of the specified App.
public static T Insert<T>(T content, App app, IEnumerable<int> blobs = null, bool sudo = false)
where T : Content
Parameters
- content
The content item to insert.
- app
- App
The app where the content item should be inserted.
- blobs
- System.Collections.Generic.IEnumerable
Ids of Blobs to attach (when content
implements IHasAttachments).
- sudo
- bool
true
to perform action as super user, otherwise false
.
Returns
The inserted T
object.
Insert(T, Content, IEnumerable, bool)
Inserts a new content item as child to the specified parent.
public static T Insert<T>(T content, Content parent, IEnumerable<int> blobs = null, bool sudo = false)
where T : Content
Parameters
- content
The content item to insert.
- parent
- Content
The parent content item.
- blobs
- System.Collections.Generic.IEnumerable
Ids of Blobs to attach (when content
implements IHasAttachments).
- sudo
- bool
true
to perform action as super user, otherwise false
.
Returns
The inserted T
object.