Abp添加DBContext
var controlSchedulesRepository = Abp.Dependency.IocManager.Instance.Resolve<Configuration.IAppConfigurationAccessor>();
var optionsBuilder = new DbContextOptionsBuilder<EvaluationSystemDbContext>();
optionsBuilder.UseSqlServer(controlSchedulesRepository.Configuration["ConnectionStrings:Default"]);
using (var context = new EvaluationSystemDbContext(optionsBuilder.Options))
{
var old = context.SchoolTerm.Where(x => x.Id == input.oldTermId&&x.TenantId==1&&x.IsDeleted==false).FirstOrDefault();
}