Img_0738_large

Kevin Rich

WebApi JSON Serialization

Circular References FTL

The Challenge

I was building a standard ASP.NET EntityFramework / WebApi / Swagger project. Attempting something a bit new, I decided my controller would return a CreatedAtRoute HttpActionResult. The code goes something a little like this:

[HttpPut] public IHttpActionResult AddMyObject([FromBody] MyObject newObject) { // validation stuff // . . .

Read More

July 13, 2016

Reading Embedded Files

Unit Testing a Stream (Part 1)

Scenario

There are several cases in which reading text from a file is more is more convenient than writing a string in the middle of my code. I've done this occasionally for SQL statements, text templates, and unit testing sample XML or JSON. For my money, it keeps the code looking cleaner and easier to read, as well as having the added . . .

Read More

June 01, 2016

Star Trek: The Original Series

A Viewing Guide For the Uninitiated

I was recently hired as a Senior .NET Developer at a new company, and most of my time has been taken architecting a revamp of the system in order to increase stability and reduce coupling. I figured I'd take a break and get down to a post I've been meaning to do for awhile for a friend of mine who has never watched the original series . . .

Read More

May 16, 2016

What do Website Analytics and HR Development have in Common?

I read an interesting article from E-Nor explaining the new Google Analytics 360 suite that allows the development team to "starting with a measurement strategy and implementation, then moving to actionable insights and working your way to optimizing your digital experience with data driven decisions."

What is really interesting to . . .

Read More

March 23, 2016

What is SCRUM

Baby don't hurt me...

A basic introduction to agile methodology. It's fairly short and fun.

Read More

March 22, 2016

Autofac registering a dependency for non-existent library

A case in which the problem wasn't in the code

Problem

Last week, our team ran into an issue which was, individually, leaving us scratching our heads. In the end, the entire process boiled down to one hidden checkbox.

We were receiving the following exception:

None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type . . .

Read More

February 14, 2016

Using Dependency Injection for Implementation Enumeration

...There is probably a better name for this

Scenario

I'm building a system that will look at a lot of transaction data and determine if each transaction qualifies for one of many criteria. At a high level, I'm asking "Does this transaction qualify for any or all of sales criteria A, B, C,...,N?"

This entry will examine a poor approach without dependency injection, . . .

Read More

February 08, 2016

Archive

Cover image credit: http://whoiskevinrich.com