Resolve instance - Autofac
- by user137348
I'm trying to figure out how to resolve a instance somewhere in the code.
At the application startup I registered a type
static void Main()
{
var builder = new ContainerBuilder();
builder.RegisterType<Foo>().As<IFoo>();
}
Now, how can I resolve an instance somewhere in the code ?
In structure mam there is a static object ObjectFactory.GetInstance<IFoo>()