public async Task<IEnumerable<ApiProduct>> GetAsync() { IEnumerable<Product> allproducts = await _service.GetAllProductAsync(); var productToReturn = allproducts.Select(p => new ApiProduct() { Id = p.Id, Name = p.Name, Description = p.Description, Price = p.Price, IsAvailable = p.Availbility > 0 }); return productToReturn; }