public async Task <IActionResult> GetAll() { var result = await _query.GetAllAsync(); if (result.IsSuccess) { return(Ok(result.Products)); } return(NotFound()); }
public Task <IEnumerable <Product> > All() => _query.GetAllAsync();