/// <summary> /// Creates a record or updates an existing record. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='entity'> /// The record to be passed to the system. /// </param> /// <param name='select'> /// The fields of the entity to be returned from the system. /// </param> /// <param name='filter'> /// The conditions that determine which records should be selected from the /// system. /// </param> /// <param name='expand'> /// The linked and detail entities that should be expanded. /// </param> /// <param name='custom'> /// The fields that are not defined in the contract of the endpoint to be /// returned from the system. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <object> PutEntityAsync(this IARQueryOperations operations, ARQuery entity, string select = default(string), string filter = default(string), string expand = default(string), string custom = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.PutEntityWithHttpMessagesAsync(entity, select, filter, expand, custom, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates a record or updates an existing record. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='entity'> /// The record to be passed to the system. /// </param> /// <param name='select'> /// The fields of the entity to be returned from the system. /// </param> /// <param name='filter'> /// The conditions that determine which records should be selected from the /// system. /// </param> /// <param name='expand'> /// The linked and detail entities that should be expanded. /// </param> /// <param name='custom'> /// The fields that are not defined in the contract of the endpoint to be /// returned from the system. /// </param> public static object PutEntity(this IARQueryOperations operations, ARQuery entity, string select = default(string), string filter = default(string), string expand = default(string), string custom = default(string)) { return(Task.Factory.StartNew(s => ((IARQueryOperations)s).PutEntityAsync(entity, select, filter, expand, custom), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }