Created
February 4, 2019 22:54
-
-
Save evgomes/01ecadb5bfa07534fd3c005641dd9ccc to your computer and use it in GitHub Desktop.
ProductService from Supermarket API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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