MarkLogic XCC/.Net Library |

# Session.InsertContent Method

Insert the given Content into the contentbase. This is equivalent to calling InsertContent(Content[]) with an array length of one. Upon return, the content will have been inserted and committed. Content objects that are rewindable will be automatically retried if a recoverable error occurs during transmission to the server. To specify the maximum number of retry attemtps, set an instance of RequestOptions with the desired value (RequestOptions.MaxAutoRetry}) using the DefaultRequestOptions property prior to invoking this method.

#### Overload List

Insert the given Content into the contentbase. This is equivalent to calling InsertContent(Content[]) with an array length of one. Upon return, the content will have been inserted and committed. Content objects that are rewindable will be automatically retried if a recoverable error occurs during transmission to the server. To specify the maximum number of retry attemtps, set an instance of RequestOptions with the desired value (RequestOptions.MaxAutoRetry}) using the DefaultRequestOptions property prior to invoking this method.

> void InsertContent(Content);

Insert all the Content objects in the contentbase as a transactional unit. Upon successful return, all documents will have been committed. If an exception is thrown, none of the documents will have been committed.

> void InsertContent(Content[]);

#### See Also

Session Interface | Marklogic.Xcc Namespace