Last post Aug 24, 2015 06:51 AM by Candice Zhou
Aug 22, 2015 08:16 PM|Weitzhandler|LINK
I'm subclassing a DbContext whose base class has a DbSet<tentity> property.
I want to configure my model to completely ignore that property, not generating a DB table for it at all. Is there a way to achieve that?
Here's what I've tried:
Aug 24, 2015 06:51 AM|Candice Zhou|LINK
According to your description, I think you want to ignore DbSet property of BdContext base class, and not generating a DB table for it at all. So, I think you could use Ignore method to accomplish it. I create the sample, code shown below:
protected override void OnModelCreating(DbModelBuilder modelBuilder)
For more information, please refer to the following links:
I hope this will help you.