Skip to content

Commit

Permalink
simplify slightly with FindAsync()
Browse files Browse the repository at this point in the history
  • Loading branch information
adelikat committed Sep 7, 2024
1 parent fecb04d commit be27c23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TASVideos/Pages/Forum/Topics/Catalog.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public async Task<IActionResult> OnPost()
return Page();
}

var topic = await db.ForumTopics.SingleOrDefaultAsync(t => t.Id == Id);
var topic = await db.ForumTopics.FindAsync(Id);
if (topic is null)
{
return NotFound();
Expand Down

0 comments on commit be27c23

Please sign in to comment.