DocumentDBRepository.CreateItemAsync C# (CSharp) Метод

CreateItemAsync() публичный статический Метод

public static CreateItemAsync ( item ) : Task
Результат Task
        public static async Task<Document> CreateItemAsync(T item)
        {
            return await client.CreateDocumentAsync(UriFactory.CreateDocumentCollectionUri(DatabaseId, CollectionId), item);
        }
        public static async Task<Document> UpdateItemAsync(string id, T item)

Usage Example

 public async Task <Document> AddNote([FromBody] Note value)
 {
     value.Id   = Guid.NewGuid().ToString();
     value.Date = DateTime.Now;
     return(await repository.CreateItemAsync(value));
 }
All Usage Examples Of DocumentDBRepository::CreateItemAsync