Gemstone Data Library
Show/Hide TOC

# ITableOperationsAddNewOrUpdateRecordAsync Method

Adds the specified modeled table record to the database if the record has not defined any of its primary key values; otherwise, the database will be updated with the specified modeled table record.

## Definition

Namespace: Gemstone.Data.Model
Assembly: Gemstone.Data (in Gemstone.Data.dll) Version: 1.0.152 -- Release Build+3b6829d9645b31d6fc0c4a03e68df9622cb42dfb
C#
View Source Request Example

    Task<int> AddNewOrUpdateRecordAsync(
    	Object record,
    	CancellationToken cancellationToken
    )

VB
View Source Request Example

    Function AddNewOrUpdateRecordAsync (
    	record As Object,
    	cancellationToken As CancellationToken
    ) As Task(Of Integer)

C++
View Source Request Example

    Task<int>^ AddNewOrUpdateRecordAsync(
    	Object^ record,
    	CancellationToken cancellationToken
    )

JavaScript
View Source Request Example

    function AddNewOrUpdateRecordAsync(record, cancellationToken);

#### Parameters

record Object
  Record to add or update.
cancellationToken CancellationToken
  Propagates notification that operations should be canceled.

#### Return Value

Task Int32
Number of rows affected.

## See Also

#### Reference

ITableOperations Interface
Gemstone.Data.Model Namespace