1
votes

Just learning about Dependency Injection and Prism...

It seems just asking around alot of people are using AutoFac as opposed to Prism...

Can you still use Prism in conjunction with AutoFac?

Or do you use Mef in conjunction with AutoFac

Sorry I'm jsut confused as to how it all fits together.

Thanks

1

1 Answers

3
votes

PRISM has two types of DI container, Unity and MEF. Auto fac only provides the container (as far as I can see) while MEF/Unity provides several other things including the mvvm design pattern.

To answer your question, Yes you can use AutoFac as a DI container with PRISM, but then you are missing the possibilities of module loading and many more things PRISM provides with the MEF/Unity Container.

Edit: Just a quick side note, MEF is not a real DI Container. "you use MEF to really manage a set of unknown things, you use IoC Containers to manage a set of known things". - Glenn Block