Posts tagged with c#

RenderPartialViewToString and async methods in ASP.NET MVC 5

Utility methods like "RenderPartialViewToString" can work with async methods. But not out of the box.


Testing Routes in ASP.NET MVC

Basic route testing in ASP.NET MVC is good, but I much prefer action-centric tests.


Fluent interfaces and state machines (part 1) - State-per-operation pattern

The simplest pattern that can be used to represent fluent interfaces is to use state machines, in a usage-first approach.


Yet another homebrewed IoC/DI container

IoC/DI containers usually come in bulky libraries. What happens when you want to use IoC/DI when designing small, dependency-free libraries?


Razor, nested layouts and sections

Razor's nested layouts really can save your day. But they leave something to be desired.

User experience for number inputs using ASP.NET MVC

There is one thing I really hate when it comes to user experience on the Web: A dumb textbox for a very specific input.


Immutable objects

I can't stress how important immutable objects are in most designs.


The broken double-check lock

The broken double-check lock: It's broken but it works.


Fluent interfaces: Introduction

Fluent interfaces are becoming more and more popular in C#; Thanks to Lambda expressions, Expression trees and Extension methods.


C# Extension methods

C# Extension methods; What are they?