public async Task <IActionResult> GetAll()
        {
            var result = await _query.GetAllAsync();

            if (result.IsSuccess)
            {
                return(Ok(result.Products));
            }
            return(NotFound());
        }
Ejemplo n.º 2
0
 public Task <IEnumerable <Product> > All()
 => _query.GetAllAsync();