Created
August 6, 2023 13:12
-
-
Save nishanc/37dc09dce6b7f7b3ef66cc8901d64fd2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var blogs = await context.Blogs.AsNoTracking().ToListAsync(); | |
if (int.TryParse(ReadLine(), out var blogId)) | |
{ | |
Console.WriteLine("Posts:"); | |
foreach (var post in blogs[blogId - 1].Posts) | |
{ | |
Console.WriteLine($" {post.Title}"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment