Skip to content

Instantly share code, notes, and snippets.

@evgomes
Created February 4, 2019 22:54
Show Gist options
  • Save evgomes/01ecadb5bfa07534fd3c005641dd9ccc to your computer and use it in GitHub Desktop.
Save evgomes/01ecadb5bfa07534fd3c005641dd9ccc to your computer and use it in GitHub Desktop.
ProductService from Supermarket API
using System.Collections.Generic;
using System.Threading.Tasks;
using Supermarket.API.Domain.Models;
using Supermarket.API.Domain.Repositories;
using Supermarket.API.Domain.Services;
namespace Supermarket.API.Services
{
public class ProductService : IProductService
{
private readonly IProductRepository _productRepository;
public ProductService(IProductRepository productRepository)
{
_productRepository = productRepository;
}
public async Task<IEnumerable<Product>> ListAsync()
{
return await _productRepository.ListAsync();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment