ContentService.Insert Method

Namespace:
Weavy.Core.Services
Assembly:
Weavy.Core.dll

Overloads

Insert(T, App, IEnumerable, bool) Inserts a new content item in the root of the specified App.
Insert(T, Content, IEnumerable, bool) 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 auth = true)

    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).

auth
bool

true to check if current user has Content, 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 auth = true)

    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).

auth
bool

true to check if current user has Content, otherwise false.

Returns

The inserted T object.