通過(guò)構(gòu)造器來(lái)注入可以獲取到實(shí)例,但是通過(guò)this.HttpContext.RequestServices.GetService<ITestRepository>()獲取的實(shí)例為空 查看完整描述