Ce este sexul? Dupa medici este o boala, pentru ca ajungi tot timpul la pat. Dupa avocati, este o injustitie, pentru ca întotdeauna este unul deasupra, altul dedesubt. Dupa politicieni este democratie perfecta, pentru ca se bucura atât cel de deasupra, cât si cel de dedesubt. Dupa economisti este o investitie proasta, pentru ca e mai mult ceea ce intra, decât ceea ce iese. Dupa matematicieni, este ecuatia perfecta, pentru ca femeia ridica membrul la maxima putere, îl închide între paranteze, îi extrage factorul comun si-l reduce apoi la expresia minima
.NET Core Dependency Injection with Func as constructor parameter
This post will be short and sweet, albeit one that caused me a bit of a headache. I recently worked on an ASP.NET Core project and I wanted to take advantage of the built-in Dependency Injection service to inject various services to the controllers. However, one of the services required a parameter in the constructor; to be more exact I was asked to create a unit of work for all the different zones that we have but the connection has to change for each region so this is the solution I came up with: The important magick is here:
Comentarii