Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

properties Auto wiring does not work with asp.net 5 #653

Closed
devmondo opened this issue Jun 27, 2015 · 1 comment
Closed

properties Auto wiring does not work with asp.net 5 #653

devmondo opened this issue Jun 27, 2015 · 1 comment

Comments

@devmondo
Copy link

hi,
i have a base controller and i dont want to use constructor injection so i tried below but it does not resolve the property, and yes i have IAsyncDocumentSession registered with Autofac and it works using constructor injection

builder.Register(c => new BaseController()).OnActivated(e =>
{
    e.Instance.dbSession= e.Context.Resolve<IAsyncDocumentSession>();
});

or this


builder.RegisterType<BaseController>()
       .PropertiesAutowired();

thanks in advanced.

@tillig
Copy link
Member

tillig commented Jul 17, 2015

This issue was moved to autofac/Autofac.Mvc#1

@tillig tillig closed this as completed Jul 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants