Create() [DocumentManager]

Create a new document

Description

Creates a new document.

Package Details

Interface

IDocumentManager

Syntax

Task Create<TDocument, TMetadata>(TDocument document, TMetadata metadata, string serviceRequestNameEnglish, string serviceRequestNameFrench, string documentVersion, int serviceRequestId, int userId);

Returns

Task

API Endpoint

Not applicable

Example

const string version = "1.0"; const int serviceRequestId = 100; const int userId = 500; // Initiate your data model with some basic data. var document = new MyServiceRequestData() { DisplayNameEn = "displayNameEn", DisplayNameFr = "displayNameFr" }; // Provide some metadata that helps to describe this particular service request. var metadata = new { MetaData = "metadata" }; // Create the "document" that will hold the data for your service request. await documentManager.Create(document, metadata, document.DisplayNameEn, document.DisplayNameFr, version, serviceRequestId, userId);