News for hackers. Stuff that matters.
Re:.NET 5.0 by kumarvvr on Tuesday November 10, 2020 @10:36PM (#25055242)
Also, I find DI to be very useful. I dont know about small projects, but in any reasonable size projects, having a DI container is a god send. Easy to setup and use.
Re:.NET 5.0 by Netcob on Wednesday November 11, 2020 @04:16AM (#25056833)
Yeah, I'm pretty shocked how much hate it seems to get. Maybe it just makes things easier for simpletons like me?

The one issue I can see with DI in ASP.NET Core is that it doesn't really do DI correctly. The point of DI is that ultimately, you have complete control over how you build your dependency graph and you shouldn't be forced to use a container at all if you don't want to. With a DI abstraction the developers are basically saying "you can do what you want, as long as it's pretty much exactly what we expect you to do".

This explains this pretty well: https://blog.simpleinjector.org/2016/06/whats-wrong-with-the...

Re:.NET 5.0 by mycall on Friday November 13, 2020 @12:41AM (#25079280)
That is 4 years old, is it still relevant?
Re:.NET 5.0 by Netcob on Sunday November 15, 2020 @08:02PM (#25106747)
Yeah, that whole approach hasn't really changed at all. I'm not sure how MS could even realistically change it without breaking a lot of stuff, so I think it's more of an example of what to avoid.