The week in .NET – 4/5/2016

Bertrand Le Roy

To read last week’s post, see The week in .NET – 3/29/2016.


Last week was a thrilling one for the .NET community, with lots of exciting announcements made at the Build conference. We decided to move the show to avoid being in direct competition with Build’s live stream. On Monday, we recorded a show with John Kemnetz on the new experimental support for C# debugging in VS Code. We tried something a little different this time: instead of our usual one hour discussion, we did a short 20 minute live screencast. Let us know what you think in the comments. This week, Beth Massi and Maria Naggaga are taking over the show.

Package of the week: Autofac

With dependency injection baked right into ASP.NET Core, it’s more important than ever to master this technique that can reduce coupling in your applications. ASP.NET provides a minimal container, but is also open for optional replacement containers. Autofac is a popular IoC container that is now compatible with .NET Core.

The following code shows how you’d register an implementation of an IOutput interface from the initialization phase of your application, so that it can later be resolved from other components.

You can then inject an IOutput into your controllers and services:

You can then inject an IOutput into your controllers and services:

This is a simple use case for Autofac, but check-out the documentation for more elaborate examples. We also have quite a few dependency injection articles this week; check-out the ASP.NET section.

Interestingly, Autofac is the IoC container used in the Orchard CMS.

Wellington, New Zealand Code Camp

On Saturday April 9th 2016 come and join with some of New Zealand’s top technical speakers for a free one day conference.




Check out F# Weekly for more great content from the F# community.


And this is it for this week!

Contribute to the week in .NET

As always, this weekly post couldn’t exist without community contributions, and I’d like to thank all those who sent links and tips. You can participate too. Did you write a great blog post, or just read one? Do you want everyone to know about an amazing new contribution or a useful library? Did you make or play a great game built on .NET? We’d love to hear from you, and feature your contributions on future posts:

This week’s post (and future posts) also contains news I first read on ASP.NET’s community spotlight, on F# weekly, on ASP.NET Weekly, and on Chris Alcock’s The Morning Brew.


Discussion is closed.

Feedback usabilla icon