public async Task test() { var redis1 = serviceProvider.GetRequiredService <IRedisOperationHelp>(); redis1.RedisString().Add("zhang", "haibo"); using (var serviceScope = serviceProvider.CreateScope()) { var redis2 = serviceScope.ServiceProvider.GetRequiredService <IRedisOperationHelp>(); redis2.RedisString().Add("zhang", "haibo"); } jsonResult.msg = "helloword"; await setting.add(new setting() { Contact = "111sdsd", DuringTime = "1", Description = "1", Integral = 1, Rule = "1" }); //throw new Naruto.Exceptions.NoAuthorizationException("111111111111111"); }