When using unity you can import the container in the constructor of a view moder per say.
But how would I do import a MEF container into a view model to resolve instances?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Generally, it is not a great idea to be passing round the container, as you end up using it as more of a service-location mechanism, but should you wish to do so, you would need to manually export the container, e.g.:
This will enable you to import it:
Or: