开发者

Autofac configuration

I am just starting with Autofac and I am trying to configure a simple registration, according to the docs this should work:

var builder = new ContainerBuilder();
builder.RegisterType<CurrentUserInfo>().As<ICurrentUserInfo>();

But I am getting:

Incorrect Number of type parameters

And according to the docs:

 _containerProvider = new ContainerPr开发者_C百科ovider(builder.Build());

But there is no Build Method...


Restarted Visual Studio..corrupted cache or something


Make sure you have referenced both Autofac.dll and Autofac.Configuration.dll.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜