Commit c74ed005 authored by Nathan Bean's avatar Nathan Bean
Browse files

Added ordering to validations

parent 81229c89
......@@ -40,7 +40,7 @@ namespace KSU.CS.Pendant.Server.Controllers
{
// Load the current user's data
User user = await _context.Users
.Include(u => u.ValidationAttempts)
.Include(u => u.ValidationAttempts.OrderByDescending(a => a.DateTime))
.ThenInclude(va => va.Assignment)
.FirstAsync(i => i.ID == int.Parse(User.FindFirst("ID").Value));
......@@ -49,6 +49,7 @@ namespace KSU.CS.Pendant.Server.Controllers
// load ALL validation attempts
var attempts = await _context.ValidationAttempts
.OrderByDescending(a => a.DateTime)
.Include(a => a.User)
.Include(a => a.Assignment)
.ToListAsync();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment