Re: DI in MVC

2019-12-18 Thread David Burstin
Hi Richard, Thanks for that - most helpful. Sorry I hadn't replied sooner. Cheers David On Wed, 11 Dec 2019 at 17:35, Richard Carde wrote: > On Fri, 29 Nov 2019 at 11:22, David Burstin > wrote: > >> Hi guys, >> >> Got a DI question: >> > ... > >> Is there a way that I can get MVC DI to

Re: DI in MVC

2019-12-10 Thread Richard Carde
On Fri, 29 Nov 2019 at 11:22, David Burstin wrote: > Hi guys, > > Got a DI question: > ... > Is there a way that I can get MVC DI to resolve IHoldAllInterfaces so that > at runtime it will pass in an object that holds all of the internal > interfaces already resolved per the startup.cs file? >

Re: DI in MVC

2019-12-03 Thread Greg Keogh
I don't know what environments, platforms and coding styles you guys are using, so it's hard for me to picture how you benefit from DI. I'm mostly writing WPF, Xamarin Forms, Blazor Wasm and WebAPI at the moment (luckily no MVC!), and I don't have any problems that DI can solve. I don't have deep

Re: DI in MVC

2019-12-03 Thread David Burstin
en > > -- > *From:* ozdotnet-boun...@ozdotnet.com on > behalf of Nick Randolph > *Sent:* Wednesday, 4 December 2019 7:33 AM > *To:* ozDotNet > *Subject:* RE: DI in MVC > > > I’m interested in the opinions regarding the use of DI – why is it t

Re: DI in MVC

2019-12-03 Thread Stephen Price
-boun...@ozdotnet.com on behalf of Nick Randolph Sent: Wednesday, 4 December 2019 7:33 AM To: ozDotNet Subject: RE: DI in MVC I’m interested in the opinions regarding the use of DI – why is it that you avoid it? I’m asking because I see cases where I find DI invaluable (eg testing) and almost

Re: DI in MVC

2019-12-03 Thread DotNet Dude
com *On > Behalf Of *David Burstin > *Sent:* Wednesday, 4 December 2019 10:19 AM > *To:* ozDotNet > *Subject:* Re: DI in MVC > > > > Yep. I avoid DI like the plague, but no option in a legacy ASP.net MVC > project. Thanks anyway. > > > > On Wed, 4 Dec 2019, 09:

RE: DI in MVC

2019-12-03 Thread Nick Randolph
t-boun...@ozdotnet.com On Behalf Of David Burstin Sent: Wednesday, 4 December 2019 10:19 AM To: ozDotNet Subject: Re: DI in MVC Yep. I avoid DI like the plague, but no option in a legacy ASP.net MVC project. Thanks anyway. On Wed, 4 Dec 2019, 09:58 Greg Keogh, mailto:gfke...@gmail.com&g

Re: DI in MVC

2019-12-03 Thread David Burstin
Yep. I avoid DI like the plague, but no option in a legacy ASP.net MVC project. Thanks anyway. On Wed, 4 Dec 2019, 09:58 Greg Keogh, wrote: > > No takers? >> > > Sorry I can't help. I only use DI when I'm forced to, or it's really > simply integrated (like in Blazor). I consider DI another form

Re: DI in MVC

2019-12-03 Thread Greg Keogh
> No takers? > Sorry I can't help. I only use DI when I'm forced to, or it's really simply integrated (like in Blazor). I consider DI another form of "magic plumbing" and prefer something closer to the service locator pattern. The problem you're seeing is one I hit when writing Xamarin with

Re: DI in MVC

2019-12-03 Thread David Burstin
No takers? On Fri, 29 Nov 2019, 12:22 David Burstin, wrote: > Hi guys, > > Got a DI question: > > Say I have a class that has the following constructor: > > public MyClass(IAnInterface a, IAnother b, IYetAnother c)... > > In my startup.cs I have: > > services.AddTransient(); > ... > > That all