Skip to content

Instantly share code, notes, and snippets.

@wullemsb
Created September 4, 2019 06:18
public class SampleContext: DbContext
{
public SampleContext(DbContextOptions<SampleContext> options)
: base(options)
{ }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder
.Query<BlogDTO>();
//Removed other code
}
public DbSet<Blog> Blogs { get; set; }
public DbQuery<BlogDTO> BlogDTOs { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment