Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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