Screenshot_10_26_14__7_52_pm_large

Khalid Abuhakmeh

Software Developer and All Around Nice Guy @AquaBirdConsult

Using JsonConverters To Get the JSON Output You Want From WebAPI

JSON.NET Magic Goodness

In a previous post, I mentioned our filtering library aptly titled RimDev.Filter. It allows developers to filter any IEnumerable collection using an object comprised of sets and ranges. It is quite magical while being easy to understand. At the same time, we have adopted the practice of echoing the request back to the caller in our responses, . . .

Read More

May 22, 2015

Democracy Vs. Dictatorship

No one's happy

If I've learned one thing over the last year of my directorship, it is that everyone will me when I am "doing it wrong". A point of criticism that I've heard from a few team members is the democratic style of decision making has slowed us down, and potentially hurts us in the long run. The counter style of leading, is I . . .

Read More

May 21, 2015

Goodbye To My iMac

Times they are a changing

In 2011, I bought my first Apple machine. A supercharged 27-inch iMac with a gorgeous display, one that is still breathtakingly vibrant to this day. In addition to the amazing display, the iMac has some amazing speakers, internal microphone, and a 720p camera. That made it perfect for me, your neighborhood friendly remote consultant. I did my . . .

Read More

May 17, 2015

Fix Swashbuckle and Swaggers Duplicate Parameters Issue for WebAPI

Update (May 14th 2015): Fixed the solution, please read further down.

Swashbuckle is a great library for automagically creating a Swagger documentation page, but it doesn't play nice with the thunderdome principle, also known as the one model in, one model out approach.

Let's take a look at an example of what I am talking about.

 . . .

Read More

May 13, 2015

Fixing ASP.NET MVC Authentication Infinite Redirects

"Follow your nose! It always knows!"

ASP.NET MVC is a great framework, dare I say that I love it. While my fondness for the framework goes deep, it is not without its flaws. One of those flaws, is the implementation of the AuthorizeAttribute. The implementation of the AuthorizeAttribute encompasses both authentication and authorization responsibilities, violating the single . . .

Read More

May 12, 2015

Don't Forget Implicit Conversion Operators in C#

We are currently working on a new WebAPI filtering library that will allow consumers of our API to pass in expressive strings to denote ranges. We modeled it after the versioning behavior found in Nuget. You can see the range defining string on the left, where the right side is the expected behavior.

1.0 = 1.0  x(,1.0] = x  1.0(,1.0) = x < . . .

Read More

May 10, 2015

Trim All Strings In A WebAPI Response

Not for the squeamish

Every bit is crucial when returning a response to an API consumer. Reviewing our current API, I noticed that some of our data was loaded incorrectly with invisible whitespace trailing some columns. This is a simple oversight, seeing that our data is imported from other sources. It is easy enough to fix via a database update, but could crop up . . .

Read More

May 08, 2015

Archive

All Categories: c#(1) home