-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathFeedController.cs
More file actions
26 lines (23 loc) · 752 Bytes
/
FeedController.cs
File metadata and controls
26 lines (23 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using SimplCommerce.Module.Catalog.Models;
using SimplCommerce.Module.Catalog.Services;
using Microsoft.AspNetCore.Mvc;
using System.Linq;
using SimplCommerce.Infrastructure.Data;
using Microsoft.EntityFrameworkCore;
namespace SimplCommerce.Module.Catalog.Controllers
{
[Area("Catalog")]
public class FeedController : Controller
{
private readonly IRepository<Product> _productRepository;
public FeedController(IRepository<Product> productRepository)
{
_productRepository = productRepository;
}
public IActionResult Index()
{
var products = _productRepository.Query().Include(p => p.ThumbnailImage).ToList();
return View(products);
}
}
}