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