/// <summary> /// Get all products. /// </summary> /// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns> public async Task <IActionResult> GetAll() { var result = await productsQueries.GetAllAsync(); if (result == null) { return(NotFound()); } return(Ok(result)); }
public async Task <IActionResult> Get() { return(Ok(await _queries.GetAllAsync())); }