Reputation
Top tag
Next privilege 125 Rep.
Vote down
Badges
4
Newest
 Editor
Impact
~669 people reached

  • 0 posts edited
  • 0 helpful flags
  • 8 votes cast
Jun
19
revised Dependency injection of ViewModel with unmanaged parameter
simplified
Jun
18
comment Dependency injection of ViewModel with unmanaged parameter
So it's a shortcoming of DI pattern. I think I can go with a personId setter and remove final keyword. Thank you.
Jun
18
comment Dependency injection of ViewModel with unmanaged parameter
I think it's not important. It's about how to pass unmanaged data to the ViewModel. I have changed my question using id and repository to get away from "who creates Person".
Jun
18
revised Dependency injection of ViewModel with unmanaged parameter
clarify life cycle of Person
Jun
18
revised Dependency injection of ViewModel with unmanaged parameter
clarify life cycle of Person
Jun
18
comment Dependency injection of ViewModel with unmanaged parameter
If I use Repository I have to pass Person.Id to the PersonEditViewModel anyway, so it's not a solution to my problem.
Jun
18
comment Dependency injection of ViewModel with unmanaged parameter
Yes, Person is a short living object, entity or whatever. If I use Repository I have to pass Person.Id to the PersonEditViewModel anyway, so it's not a solution.
Jun
18
awarded  Editor
Jun
18
comment Dependency injection of ViewModel with unmanaged parameter
@Ian Fairman I've edited the question. It is a general question about DI pattern.
Jun
18
revised Dependency injection of ViewModel with unmanaged parameter
added 318 characters in body
Jun
16
awarded  Student
Jun
16
asked Dependency injection of ViewModel with unmanaged parameter
Jun
16
comment Desktop application, dependency injection
According to the mentioned article Pattern Recognition: Abstract Factory or Service Locator you have just created a Service Locator.
May
27
awarded  Teacher
May
27
answered Environment-aware Code
May
13
awarded  Supporter