Khalid Abuhakmeh

Software Developer and All Around Nice Guy @AquaBirdConsult

ASP.NET WebAPI and Multi-Column Sorting Queryables

Useful for other scenarios as well

Whenever building a querying API, whether web or local,I want to expose some basic features for my consumers: filtering, paging, and sorting. The first two are really easy to implement; well easy in respect to having solved them. Sorting on one field is easy, but becomes increasingly difficult when sorting on multiple fields. In this post, . . .

Read More

April 19, 2015

A Better Validation Result For ASP.NET WebAPI

WebAPI is starting to grow on me. Just like any framework, it takes time to configure it the way I like, but luckily I've been able to configure everything that doesn't work with my sensibilities. One of the features I decided to tweak, is the format of the validation messages that come from WebAPI.

 if (!ModelState.IsValid) return  . . .

Read More

April 18, 2015

Teamwork and Position Players

Who's on first?

Development teams are not unlike a professional sports team: everyone on the team needs to play their position, and play that position to the best of their ability. In a development environment, positions are designated by title. Titles are not meant to limit an individual, but are meant to set a baseline expectation for performance.


A . . .

Read More

April 12, 2015

An Overview of Lambdas in .NET

Lambdas, Actions, Funcs, and Predicates

Lambdas were a great addition to the .NET Framework in 2008, but can still be confusing
for many modern .NET developers. MSDN defines lambdas as the following:

A lambda expression is an anonymous function that you can use to create delegates or expression tree types. By using lambda expressions, you can write local functions that can be passed . . .

Read More

April 09, 2015

FluentValidation and CascadeMode

Optimizing your validation execution

FluentValidation is easily the best validation framework in the .NET space. I've been using it for several years now, but only realized recently that I could tweak how my validation rules are executed. By utilizing the cascade mode setting I can choose when validation ends.

There are two cascade modes:

  • Continue (the default) - always . . .

Read More

April 01, 2015

Unit Testing With ASP.NET WebAPI UrlHelper

Developing with ASP.NET WebAPI is pretty straight forward, but there are crucial parts of the framework you need to work around to get valuable unit tests. One of the most important part of any web framework is routing, and in WebAPI, routes are resolved using the UrlHelper class. In this post, I'll show you the code necessary to create a . . .

Read More

April 01, 2015

Interview Question : What Is Your Ideal Dependency Injection Tool?

My Interview with Blizzard...during a blizzard

Five years ago, I worked at a credit union CUSO. It is safe to say it was one of the worst places I've worked. During this time, I applied for many positions at other organizations, one of those being Blizzard. It was a long shot, and a novelty submission. I could tell my friends I applied to Blizzard, and if they didn't call me back . . .

Read More

March 29, 2015


All Categories: c#(1) home