Files
Aaru.Server/DiscImageChef.Server/Areas/Admin/Controllers/UsbProductsController.cs

27 lines
853 B
C#
Raw Normal View History

2019-11-07 22:43:37 +00:00
using System.Linq;
using System.Threading.Tasks;
using DiscImageChef.Server.Models;
using Microsoft.AspNetCore.Authorization;
2019-11-07 22:43:37 +00:00
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Query;
namespace DiscImageChef.Server.Areas.Admin.Controllers
{
2019-11-08 20:30:13 +00:00
[Area("Admin"), Authorize]
2019-11-07 22:43:37 +00:00
public class UsbProductsController : Controller
{
readonly DicServerContext _context;
public UsbProductsController(DicServerContext context) => _context = context;
// GET: Admin/UsbProducts
public async Task<IActionResult> Index()
{
IIncludableQueryable<UsbProduct, UsbVendor> dicServerContext = _context.UsbProducts.Include(u => u.Vendor);
return View(await dicServerContext.ToListAsync());
}
}
}