diff --git a/asg_form/Controllers/Teamregistration/RegisterController.cs b/asg_form/Controllers/Teamregistration/RegisterController.cs index 2f991c2..a416cd2 100644 --- a/asg_form/Controllers/Teamregistration/RegisterController.cs +++ b/asg_form/Controllers/Teamregistration/RegisterController.cs @@ -300,13 +300,9 @@ namespace asg_form.Controllers.Teamregistration } using (TestDbContext sub = new TestDbContext()) { - var query = sub.T_Comform.AsQueryable() - .Where(n => n.id == Id) - .OrderByDescending(a => a.user_id); + var query = await sub.T_Comform.FirstOrDefaultAsync(n => n.id == Id); - var result = await query.ToListAsync(); - - return Ok(new { code = 200, data = result }); + return Ok(new { code = 200, data = query }); } } }