Skip to content

Instantly share code, notes, and snippets.

@StephanyBatista
Created January 22, 2018 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StephanyBatista/6a0e8a8d00279edf76b5838f3eb8a77e to your computer and use it in GitHub Desktop.
Save StephanyBatista/6a0e8a8d00279edf76b5838f3eb8a77e to your computer and use it in GitHub Desktop.
public class ProductController : Controller
{
private readonly ProductRepository _productRepository;
public ProductController(ProductRepository productRepository)
{
_productRepository = productRepository;
}
public IActionResult Index()
{
return View(_productRepository.GetAll());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment