Sort block descriptors.

This commit is contained in:
2019-11-10 13:49:06 +00:00
parent 5b1204242d
commit 82a106f49c

View File

@@ -1,6 +1,5 @@
using System.Linq;
using System.Threading.Tasks;
using DiscImageChef.CommonTypes.Metadata;
using DiscImageChef.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
@@ -16,6 +15,8 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
public BlockDescriptorsController(DicServerContext context) => _context = context;
// GET: Admin/BlockDescriptors
public async Task<IActionResult> Index() => View(await _context.BlockDescriptor.ToListAsync());
public async Task<IActionResult> Index() =>
View(await _context.BlockDescriptor.OrderBy(b => b.BlockLength).ThenBy(b => b.Blocks).
ThenBy(b => b.Density).ToListAsync());
}
}