public virtual async Task <IActionResult> GetAsync() { if (_getAll == null) { throw Exceptions.UnSupportedRequestMethod; } var entities = await _getAll.GetAsync(); return(Ok(entities)); }
public virtual async Task <IActionResult> GetAsync() { _logger.LogTrace($"Entering {nameof(GetAsync)}()."); if (_getAll == null) { throw new RequestMethodNotAllowedException(HttpMethod.Get); } var resources = await _getAll.GetAsync(); return(Ok(resources)); }
/// <summary> /// Gets a collection of top-level (non-nested) resources. /// Example: GET /articles HTTP/1.1 /// </summary> public virtual async Task <IActionResult> GetAsync(CancellationToken cancellationToken) { _traceWriter.LogMethodStart(); if (_getAll == null) { throw new RequestMethodNotAllowedException(HttpMethod.Get); } var resources = await _getAll.GetAsync(cancellationToken); return(Ok(resources)); }