sdk/dotnet/src/Microsoft.Datasync.Client/Table/RemoteTable.generic.cs
/// <summary>
/// Inserts the instance in the remote table.
/// </summary>
/// <param name="instance">The instance to insert.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> to observe.</param>
/// <returns>A task that returns when the operation is complete.</returns>
Inserts the instance in the remote table.
Inserts the instance in the remote table .
public async Task InsertItemAsync(T instance, CancellationToken cancellationToken = default)
        {
            Arguments.IsNotNull(instance, nameof(instance));
            JObject value = ServiceClient.Serializer.Serialize(instance) as JObject;
            value = ServiceSerializer.RemoveSystemProperties(value, out _);
            JToken insertedValue = await TransformHttpExceptionAsync(() => InsertItemAsync(value, cancellationToken)).ConfigureAwait(false);
            ServiceClient.Serializer.Deserialize(insertedValue, instance);
        }
public async Task InsertItemAsync ( T instance , CancellationToken cancellationToken = default ) { Arguments . IsNotNull ( instance , nameof ( instance ) ) ; JObject value = ServiceClient . Serializer . Serialize ( instance ) as JObject ; value = ServiceSerializer . RemoveSystemProperties ( value , out _ ) ; JToken insertedValue = await TransformHttpExceptionAsync ( ( ) => InsertItemAsync ( value , cancellationToken ) ) . ConfigureAwait ( false ) ; ServiceClient . Serializer . Deserialize ( insertedValue , instance ) ; }
Inserts the instance in the remote table.
Inserts the instance in the remote table .
A task that returns when the operation is complete.
A task that returns when the operation is complete .
instance
T
The instance to insert.
The instance to insert .
cancellationToken
CancellationToken
A  to observe.
A to observe .