要引用这几个才有GetOwinContext与GetAutofacLifetimeScope

using Owin;
using Autofac;
using Autofac.Integration.Owin;
using System.Web;


var owin = this.Request.GetOwinContext();
            var scop = owin.GetAutofacLifetimeScope();
            scop.ResolveOptional()

 

posted @ 2016-06-08 05:33  shiningrise  阅读(558)  评论(0编辑  收藏  举报
// 侧边栏目录 // https://blog-static.cnblogs.com/files/douzujun/marvin.nav.my1502.css