Skip to content

Commit

Permalink
add debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
EdiWang committed May 7, 2024
1 parent 73dbf94 commit 15f5521
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Moonglade.Data/Seed.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,22 @@ public static async Task SeedAsync(BlogDbContext dbContext, ILogger logger, int

try
{
logger.LogDebug("Adding themes data...");
await dbContext.BlogTheme.AddRangeAsync(GetThemes());

logger.LogDebug("Adding categories data...");
await dbContext.Category.AddRangeAsync(GetCategories());

logger.LogDebug("Adding tags data...");
await dbContext.Tag.AddRangeAsync(GetTags());

logger.LogDebug("Adding friend links data...");
await dbContext.FriendLink.AddRangeAsync(GetFriendLinks());

logger.LogDebug("Adding pages data...");
await dbContext.CustomPage.AddRangeAsync(GetPages());

logger.LogDebug("Adding example post...");
// Add example post
var content = "Moonglade is the blog system for https://edi.wang. Powered by .NET 8 and runs on Microsoft Azure, the best cloud on the planet.";

Expand Down

0 comments on commit 15f5521

Please sign in to comment.