Image for post
Image for post

I noticed that when it becomes necessary to work with SQL databases in .Net applications, developers often chose some ORM library (.Net Entity Framework in most cases) without even considering other alternatives. At first glance, this is a reasonable decision, because for popular ORM libraries there are many tutorials, great toolkit, and many experienced developers. However, it is not always a good choice — I would at least consider other options if your application:

  1. Mainly works with fact relationships rather than objects
  2. Requires using dynamic (not predefined) queries

Fact Relationships

If your application mainly implements use cases similar to these ones:


Image for post
Image for post

Recently, when I was reviewing the new features that are going to be included in .Net 5, I came across an interesting one — C# Source Generators. This feature especially interested me since I have been using a similar approach for the last… 5 years and what Microsoft proposes is simply a deeper integration of this approach into the build process.

Further I’ll share my experience using Roslyn in code generation and I think this will help you better understand what exactly Microsoft offers and when you can use it.

First, let’s look at a typical code generation scenario. You…

Image for post
Image for post

It was a legacy enterprise project and I was asked to improve its “advanced” filtering capabilities.

Before they had something like this:

Image for post
Image for post

Almost 100% of asynchronous tasks that you deal with in your C# code are running or already completed regardless of whether you “await” them or not. This can be shown with the following example:

static async Task Main()
var task = GetValueAsync();
await Task.Delay(500);
Console.WriteLine("Result is: " + await task);
static async Task<int> GetValueAsync()
Console.WriteLine("Async Start");
await Task.Delay(100);
Console.WriteLine("Async End");
return 42;


Async Start
Async End
Result is: 42

As you see GetValueAsync finished before await but what if the behavior is not desired and you do not want a task to start…

One of the Angular core concepts is the update of a component’s DOM in case the framework detects changes in its fields used in the template binding expressions. This is very convenient since it allows changing the component’s view just by updating the corresponding fields without any direct manipulations with DOM. At the same time, Angular leaves the way of how the component’s fields are updated to a developer and that works well in some simple scenarios since developers can quickly create components which meet all necessary requirements without the need to introduce any additional abstractions. …

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store