Finding Nearby Users with Entity Framework Core Spatial Data

Since version 2.2, EF Core supports mapping to spatial data using types from the NetTopologySuite. In this post, I will demonstrate how to use this feature to query entities based on their geolocation....

9 December 2018

C# Under the Hood: async/await

Async and await keywords came with C# 5 as a cool new feature for handling asynchronous tasks. They allow us to specify tasks to be executed asynchronously in an easy and straightforward fashion. However, some people are mystified by asynchronous programming and are not sure how it actually works. I will try to give you an insight of the magic that happens under the hood when async and await are...

25 February 2018

Dependency Injection Trade-Offs

Most of the classes depend on some other classes to do some work for them. Since those other classes can have their own dependencies, the total number of dependencies (both direct and indirect) of a class can grow exponentially, which means our dependency graph can easily become quite large. In scenarios where dependency graphs are large, resolving dependencies can become a significant task and you should carefully decide: Should all ...

31 January 2018

C# Under the Hood: Locking

In this post, I will try to briefly explain how locking mechanisms provided by .NET work and how CLR manages to keep track of locks and do the synchronization, allowing us to achieve mutual exclusion....