/// <summary> /// Update a feature /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> /// <param name='body'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <object> PutFeatureAsync(this IFeatureManagementAppTierAPI operations, System.Guid id, Feature body = default(Feature), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.PutFeatureWithHttpMessagesAsync(id, body, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
public async Task <IActionResult> Put(Guid id, Feature feature) { if (id == Guid.Empty) { return(BadRequest("Invalid Id")); } if (feature == null) { return(BadRequest("Feature is required")); } using (IFeatureManagementAppTierAPI api = CreateFeatureManagementApi()) { HttpOperationResponse <object> result = await api.PutFeatureWithHttpMessagesAsync(id, feature); return(CreateResponse <Feature>(result)); } }