Unit Testing Web API Controllers with Headers

I couldn’t find a good example of how to unit test a controller with [code langauge=”csharp”] var headerValue = Request.Headers.GetValues("HEADER");[/code] in the controller. Not too common, but happens enough it can be expected. Also the controller inheirts “ApiController” which doesn’t inheirt from “ControllerBase” so the usual controller context call won’t work. Here is how I […]

Custom Cabinet – Part II

Now the face frame is next. You can use pocket screws everywhere you see a Domino instead. I cut the eight holes for the four Dominos. The Dominos have a specific glue requirements, mainly because they are not like normal biscuits. First, dump some glue in the hole. The domino cutter cuts a little extra […]

Roubo Build Update

All pegged up and the bench tops have been set on base. Unlike my thin saw horses, it didn’t budge at the extra weight. I have some quick sanding to do for another project. So the tops might stay like this a while. The height is great.  

Entity Framework MSSQL Sequence Numbers

I had an application where I wanted to have a sequence key that spanned multiple tables. Mainly to provide better logging support, so the log search would be “Find Object X” instead of “Find object X with type Y”. Then add in namespacing and the logs start to get wide, IE “Find Object 12 with […]

Failed to start shard

I have a project that uses ElasticSearch for searching and all the goodness that it has. When I test a new technology, I like to break it a few times. ¬†Like adding a bunch of data, hitting the stop button on the service or killing the task in task manager. So I did this with […]

S.L.A.B. To ElasticSearch

I always like to find new ways to not write the same code twice. Logging has been one of those features that every application needs, and every application does it differently. Do you log to SQL, a text file, for how long, what format? The Semantic Logging Application Block supports SQL, Azure, ElasticSearch or any […]