Skip to content

Commit

Permalink
Fix missing Simple Logging region (#3779)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickklaeren authored Mar 22, 2022
1 parent 6a8fe3d commit 6f860ca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion samples/core/Performance/Other/BloggingContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ public class BloggingContext : DbContext
public DbSet<Blog> Blogs { get; set; }
public DbSet<Post> Posts { get; set; }

#region SimpleLogging
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder
.UseSqlServer(@"Server=(localdb)\mssqllocaldb;Database=Blogging;Trusted_Connection=True")
.LogTo(Console.WriteLine, LogLevel.Information);
}
#endregion

protected override void OnModelCreating(ModelBuilder modelBuilder)
{
Expand All @@ -39,4 +41,4 @@ public class Post

public int BlogId { get; set; }
public Blog Blog { get; set; }
}
}

0 comments on commit 6f860ca

Please sign in to comment.