////// 重写以筛选出当前上下文的实体映射信息 /// protected override IEnumerableEntityMappersFilter(IEnumerable entityMappers) { Type contextType = typeof(TDbContext); Expression > predicate = m => m.DbContextType == contextType; if (contextType == typeof(DefaultDbContext)) { predicate = predicate.Or(m => m.DbContextType == null); } return entityMappers.Where(predicate.Compile()); }