Skip to content

Instantly share code, notes, and snippets.

@wullemsb
Created January 18, 2018 07:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save wullemsb/9a15fb66bb4f3404f2cdbba830b34690 to your computer and use it in GitHub Desktop.
Save wullemsb/9a15fb66bb4f3404f2cdbba830b34690 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