Created
August 20, 2014 21:00
-
-
Save ro31337/879717d3daac46393c89 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 MyContext : DbContext | |
{ | |
public virtual IDbSet<Company> Companies { get; set; } | |
protected override void OnModelCreating(DbModelBuilder modelBuilder) | |
{ | |
modelBuilder.Entity<Company>() | |
.Map(m => m.Requires("IsDeleted").HasValue(false)) | |
.Ignore(m => m.IsDeleted); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment