Blog

 










ASP.NET MVC - Generic filtering based on expressions

2/18/2012
.NET, ASP.NET, C#, MVC
25 Comments

Recently I was asked to implement a reusable filtering mechanism in an ASP.NET MVC application. To be more concrete: A website shows a grid containing arbitrary data. The user should be able to enter a filter for each grid column.
The filters should be generated based on the type of the displayed objects. With that functionality, it is possible to filter every grid in the application with very little effort. Moreover I added a possibility to add custom search criteria.





YAGNI - 'Poor-mans CQRS' sample application with Entity Framework

11/6/2011
.NET, C#, EF, Test
2 Comments

This week Daniel Lang published an interesting article about unnecessary overhead in simple applications.
In a nutshell he proposes an architecture called "Poor-mans CQRS". In his sample he uses an ASP.NET MVC application. The controllers retrieve their required data directly from the database (Query), and updates are performed in service layer (Command).
In this post I will provide a (simple) application, which is based on the Entity Framework. It shows the principle and explains how unit tests can be written without querying a real database.



IoC Container Benchmark - Performance comparison

8/30/2011
.NET, C#
171 Comments

In this post I will do a performance comparison of the most popular IoC containers.
Of course performance is not the only criteria when choosing a container for a project. Perhaps you need features like interception or you develop for a specific platform, then not all containers are suited. But especially in high-load scenarios like a web application, a fast container can help you to serve more requests in the same time, so why not choose the fastest one?



Code Coverage - Testing with OpenCover and PartCover

Just some days ago, a new code coverage tool was released for the first time. It's called OpenCover. Shaun Wilde created this tool, since PartCover 4 has some issues that are difficult to resolve with the current code base. He describes some of them on his blog.
In this post I will do a comparison between OpenCover and PartCover and show how these tools can be used to get the coverage of unit tests.