会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
打赏
大雄
Softly sighs the Rainbow ,Misty songs of old
博客园
首页
新随笔
联系
订阅
管理
2020年11月11日
.net core 手动获取注入对象
摘要: 控制器相关中:HttpContext来获取实例 HttpContext下有一个RequestedService同样可以用来获取实例对象 IUserDAL userDAL = HttpContext.RequestServices.GetService(typeof(IUserDAL)) as IUs
阅读全文
posted @ 2020-11-11 15:52 Bear.Tirisfal
阅读(3557)
评论(0)
推荐(0)
公告