Sort media formats.

This commit is contained in:
2019-11-10 23:41:33 +00:00
parent 8b0932a5d9
commit de69a8ca6d

View File

@@ -1,3 +1,4 @@
using System.Linq;
using System.Threading.Tasks;
using DiscImageChef.Server.Models;
using Microsoft.AspNetCore.Authorization;
@@ -14,7 +15,8 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
public MediaFormatsController(DicServerContext context) => _context = context;
// GET: Admin/MediaFormats
public async Task<IActionResult> Index() => View(await _context.MediaFormats.ToListAsync());
public async Task<IActionResult> Index() =>
View(await _context.MediaFormats.OrderBy(mf => mf.Name).ToListAsync());
// GET: Admin/MediaFormats/Delete/5
public async Task<IActionResult> Delete(int? id)