Clean Startup in your AspNetCore

I want to talk about this point made about Keeping a Clean Startup.cs in Asp.Net Core by K. Scott Alan. Mostly I want to agree and elaborate on it. (Warning! I used the British English customised below. If this doesn't match your sensibilities, just use customize instead.) The…

My C# naming conventions

I have opinions! I've been meaning to write this article for a while. I have various opinions about code formatting, and they may or may not conform to the norm. Also, they change occasionally as and when I get a good explanation of why a different way is better, or…

.Net Core Series - Self-contained Applications

This is a series on the .Net Core 1.0 bits. Looking for .Net Core 2 Series? Getting Started What's in the box Using Multiple Projects Testing NuGet Multi-targeting Publishing Portable Applications Self-contained Applications <=(We are here) This was meant to be an article on Self-contained applications in .Net…

There can be only one return; 0 RLY?

My opinions and choices on style of coding evolves and changes over time. By blogging about this now, I can refer back later when I change my mind. I can also elicit the opinions of others to influence me to change my ways if I happen to be wrong and…

In C#, your structs should be immutable.

I wrote some code. It was simple code. I had a collection. I iterated over the collection and updated the values. I did this several times in an outer loop. The code didn't work. Why didn't it work? My collection was an array of Structs. When I pulled an item…

Migrating onto dotnet tools 1.0.0

Since Visual Studio 2017 is out, and we have a 1.0.0 tools release for .Net Core, I'm going to try and migrate a simple project from the pre-release tooling, onto the new tooling. The biggest difference is that instead of using a project.json file, the new tooling…

.Net Core Series - Publishing Portable Applications

This is a series on the .Net Core 1.0 bits. Looking for .Net Core 2 Series? Getting Started What's in the box Using Multiple Projects Testing NuGet Multi-targeting Publishing Portable Applications <=(We are here) Self-contained Applications We can now take everything we have learned and start publishing our…

How to Constructors

Constructors for services are a really handy way to pass in configuration, variation and dependencies. Here are some ways I have learned to use Constructors and some ideas on testing. What shouldn't be in a Constructor Execution. Any complex execution of code should not be in a constructor. This includes…