I have a Entity Framework model set up with text templates to generate the code. However, one of them creates the DBContext
containing an OnModelCreating
.
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
throw new UnintentionalCodeFirstException();
}
How do expand on this, since a partial class with the same override does not work.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…