Esempio n. 1
0
 /// <summary>
 /// Add new entity to spice_govministries
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// New entity
 /// </param>
 /// <param name='prefer'>
 /// Required in order for the service to return a JSON representation of the
 /// object.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task<MicrosoftDynamicsCRMspiceGovministry> CreateAsync(this IGovministries operations, MicrosoftDynamicsCRMspiceGovministry body, string prefer = "return=representation", CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(body, prefer, null, cancellationToken).ConfigureAwait(false))
     {
         return _result.Body;
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Add new entity to spice_govministries
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// New entity
 /// </param>
 /// <param name='prefer'>
 /// Required in order for the service to return a JSON representation of the
 /// object.
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse<MicrosoftDynamicsCRMspiceGovministry> CreateWithHttpMessages(this IGovministries operations, MicrosoftDynamicsCRMspiceGovministry body, string prefer = "return=representation", Dictionary<string, List<string>> customHeaders = null)
 {
     return operations.CreateWithHttpMessagesAsync(body, prefer, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult();
 }