mirror of
https://github.com/rudollee/LearningMVC.git
synced 2025-06-08 00:16:14 +00:00
26 lines
510 B
C#
26 lines
510 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
using SportsStore.Domain.Abstract;
|
|
using SportsStore.Domain.Entities;
|
|
|
|
namespace SportsStore.WebUI.Controllers
|
|
{
|
|
public class ProductController : Controller
|
|
{
|
|
private IProductRepository repository;
|
|
|
|
public ProductController(IProductRepository productRepository)
|
|
{
|
|
this.repository = productRepository;
|
|
}
|
|
|
|
public ViewResult List()
|
|
{
|
|
return View(repository.Products);
|
|
}
|
|
|
|
}
|
|
} |