Files
Aaru.Server/Aaru.Server/Areas/Admin/Controllers/PartitionsController.cs

20 lines
623 B
C#
Raw Normal View History

2019-11-07 22:43:37 +00:00
using System.Linq;
using System.Threading.Tasks;
2020-02-29 20:00:34 +00:00
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
2019-11-07 22:43:37 +00:00
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
2020-02-29 20:00:34 +00:00
namespace Aaru.Server.Areas.Admin.Controllers
2019-11-07 22:43:37 +00:00
{
2019-11-08 20:30:13 +00:00
[Area("Admin"), Authorize]
2020-07-22 15:26:02 +01:00
public sealed class PartitionsController : Controller
2019-11-07 22:43:37 +00:00
{
2020-02-29 21:13:41 +00:00
readonly AaruServerContext _context;
2019-11-07 22:43:37 +00:00
2020-02-29 21:13:41 +00:00
public PartitionsController(AaruServerContext context) => _context = context;
2019-11-07 22:43:37 +00:00
// GET: Admin/Partitions
2019-11-10 23:50:02 +00:00
public async Task<IActionResult> Index() => View(await _context.Partitions.OrderBy(p => p.Name).ToListAsync());
2019-11-07 22:43:37 +00:00
}
}