Close

.Net

Introducing RedStar.Amounts

How many times have you had to ask a colleague what unit that external application is using? Or worse, had bugs because you forgot to divide by 100? In many applications, it is common to change values when they are received by dividing or multiplying them. This is done because the other application uses centimeters, […]

Read More

C# string magic

In C#, you need strings often. Less often, you need a long string, but it still happens. So here’s a nice thing to know. You can split them over multiple lines without need the + operator and an Environment.NewLine call. What you need is a verbatim string literal. Those start with an @: @”c:\Docs\Source\a.txt” // […]

Read More

Running ASP.NET (not Core) from NPM

I’m currently working on a NodeJS project that makes HTTP calls to an ASP.NET (4.5.1) application. When running locally, I also want to make these calls to my local ASP.NET application. Sometimes, however, I don’t want to start up Visual Studio, open the project, compile, and run. Seeing as this is not ASP.NET Core, I […]

Read More

Autofac, Web API and filters

A short post with a small, useful tip. It’s mainly for my future self, but may be good to know for you too. If you’re using ASP.NET Web API, you might have controllers that look like this: public class CustomerController : ApiController { private readonly ILog _log; public CustomerController(ILog log) { _log = log; } […]

Read More

Automating your NuGet package

NuGet is a great way of handling dependencies. It isn’t perfect, but if you’ve experienced the days of DLL hell, you know NuGet hell is at least more manageable. One step that I’ve found was always missing, is automating the publishing of your NuGet package. We’ve played around with different scripts in the past, bat […]

Read More