Tag: c#

.NET Steps – Caching II – Distributed

Introduction General In our last post we talked about what caching is and implemented in memory caching. If you recall, we did a couple of things: If you remember, in the last post I said that in memory cache is a thread safe object that lives in memory from the moment you start your application to the moment […]

.NET Steps – REST API Versioning

Did you ever find yourself in a situation where you need to fetch something from external API but the response that you are getting is not the response that is written in the notepad – oh, I mean “the docs”? If you did, I know that the next thing crossed your mind was: those fucking morons.

.NET Shorts – Use HttpContextAccessor

Sometimes, you have to get some data from headers/tokens. Sometimes, you have to do it in your application layer. And things can get wierd. You could potentally extract it at controller level and send it as parameter. But that’s just ugly. Luckly, now you have IHttpContextAccessor that makes things easy for you, I, on the other hand, am entirely different story.