Mock HttpClient Without Wrapper Using HttpMessageHandler

There is a lot of discussion on github about why HttpClient doesn’t have an interface. Despite the long winded discussion on github about the subject, I think mocking the HttpClient isn’t that hard. We can solve this problem with a wrapper, but wrappers are not a good idea when we can avoid them. Partly because … 

 

12 Visual Studio 2015 Extensions You Might Find Useful

I previously wrote about some Visual Studio extensions that I though was most useful here. I think that list still stands. But in this post I’m going to introduce less known extensions that I think might be useful, but not essential. Viasfora Viasfora adds tons of features to your code formatting experience. From code rain … 

 

How To Use IActionResult Abstraction To Achieve Graceful Degradation

You might have heard the term graceful degradation. It this specific instance it refers to the page usability and the fact that when you rely on some language that are not available everywhere, the page still will be usable, w3’s article define it as: Graceful degradation Providing an alternative version of your functionality or making … 

 

Importance Of Language And Its Effect On Research

I’m not a native English speaker, as a result, I’m more sensitive to the author’s use of words when reading, by sensitive I mean, I’m more prone to misunderstand it, this was especially true at the beginning of my career. Sometimes when I read, I would ask myself why would the author even needed to … 

 

Dynamically Building JSON Tree For Use In Javascript Components Using C#

These days, many JavaScript components use JSON when it comes to working with data, the reason is obvious enough, but some components that build some kind of tree structure like this one, are going to need a JSON tree. Building a static JSON tree is easy, but how do you build a dynamic JSON tree … 

 

How To Show Currently Online Users (Members) Using Asp.Net MVC And Identity

How To Show Currently Online Users (Members) Using Asp.Net MVC Identity Introduction In this post, I’m going to show how to implement online users feature using Asp.Net MVC Identitiy. In the old Membership system of ASP.NET, things were a little easier, you could get the list of all users, also you could see who is … 

 

Implementing Search Without Convoluted If Statements In Asp.Net MVC

In the beginning, when I start to learn C# and Asp.Net MVC, building search form was a complicated thing to do for me. The more criteria I’ve had for a search form, the harder it would get, but it was hard because I didn’t use the proper tools to do my job. Back then, I … 

 

Supercharge Your Text Editing With Viasfora

I recently wrote about Top 14 Must Have Free Extensions For Visual Studio 2015, but it turns out, I’ve missed on one other great extension. It is called Viasfora. What Viasfora does for you is that it changes your braces and parenthesis color in such a way that nested parenthesis and braces do not confuse … 

 

Retrieving Email From Google, Microsoft And Facebook External Login Provider

In this post, I’m going to show you how you can retrieve email address form the OAuth external login provider of Facebook, Google, and Microsoft in Asp.Net MVC applications. I’m not going to discuss how you can use these providers in general. For that there are some good resources already, one of them is OAuth … 

 

Customizing ELMAH To Prevent It From Logging Unnecessary Errors Using Entity Framework and ASP.Net MVC

Couple of months ago, I needed to use ELMAH in one of my project (in case you haven’t heard about it, you can see what it can do for you here), but the component out of the box had some problem in my opinion. for example when an error occurs, it goes ahead and log …