Skip to content

Instantly share code, notes, and snippets.

@manhnguyenv
Forked from wullemsb/BloggingContext.cs
Created August 5, 2019 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manhnguyenv/8637b06eec4211d3bf4bfffe93008cfd to your computer and use it in GitHub Desktop.
Save manhnguyenv/8637b06eec4211d3bf4bfffe93008cfd to your computer and use it in GitHub Desktop.
public class BloggingContext : DbContext
{
public DbSet<Blog> Blogs { get; set; }
public DbSet<Post> Posts { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) =>
optionsBuilder
//Log parameter values
.EnableSensitiveDataLogging()
.UseSqlCe(@"Data Source=Blogging.sdf");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment