I have an AccountViewModel
object which requires two arguments in its constructor: a DataStore
object registered in the WindsorContainer
, and an Account
data model object.
Now, when the user selects an account in a list of accounts, I need to resolve
an AccountViewModel
object from the container using the selected account.
But the problem is the account is not registered in the container, and when I register it on the SelectionChanged
event, I ran into a duplicate registration error.
I also investigated the various life cycles for each dependency but I still can't figure out a solution (I'm obviously a beginner in using IoC frameworks since I prefer my own factory class).