News for hackers. Stuff that matters.
Re:.NET Myths Dispelled by spaetzleesser on Sunday March 13, 2022 @12:38PM (#30662922)
In .NET a lot of DI is done by adding another interface to the constructor. So if you need some service way down the stack you add it to the constructor. This then in turn can require adding this dependency to all the tests that use this service.
Re:.NET Myths Dispelled by Van-Dame on Monday March 14, 2022 @12:17AM (#30668478)
Comments like these really amaze me. What sort of competent editor cannot handle such simple refactorings?
Re:.NET Myths Dispelled by infogulch on Sunday March 13, 2022 @02:53PM (#30664517)
My comment describes a way to organize unit tests to work around this issue.
Re:.NET Myths Dispelled by hackerfromthefu on Monday March 14, 2022 @07:18AM (#30671004)
Maybe but in Blazor you have the choice of Property or Constructor DI. This choice is in all the major DI container libraries I've worked with in .NET, around a dozen over the years.