Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • If I use Repository I have to pass Person.Id to the PersonEditViewModel anyway, so it's not a solution to my problem. Commented Jun 18, 2015 at 13:47
  • 1
    True. I would not try to get DI container to do that for me. Sometimes, this id would need to passed down to hierarchy of dependencies and it starts becoming serious problem for DI pattern. In those cases, I have use abstractions that help with passing data objects around. This was specific to my use case but I can share details if you are interested. Commented Jun 18, 2015 at 14:16
  • So it's a shortcoming of DI pattern. I think I can go with a personId setter and remove final keyword. Thank you. Commented Jun 18, 2015 at 15:03