Created
September 4, 2019 06:18
-
-
Save wullemsb/4d2aa23f199f9017098ecc5a07e77ba7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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